If you are using the main C++ distribution of wxWidgets, Feel free to ask any question related to wxWidgets development here. This means questions regarding to C++ and wxWidgets, not compile problems.
Hi!
I've run in to a weird problem here in my OnSub-function. The first part works perfect but the else-part just won't work! I get no errors but the color change doesn't happen. If I put that line in the constructor instead it works perfectly.
a wxPanel doesn't really have a foreground color, it just happens that the wxStaticText will inherit that color, if you add it to the panel after setting the color.
If you want to change the color of the wxStaticText, you should use st->SetForegroundColour().
Eventually you may need a st->Refresh() to make the change visible.
doublemax wrote:a wxPanel doesn't really have a foreground color, it just happens that the wxStaticText will inherit that color, if you add it to the panel after setting the color.
If you want to change the color of the wxStaticText, you should use st->SetForegroundColour().
Eventually you may need a st->Refresh() to make the change visible.