问题
I want to display an error message in red on status bar if a user action results in error. I have tried setting the forground color to red but the it still displays the message in default black font. How do make the font color red on statusbar? I'm using wxWidgets 2.8 on red hat 5.5
Thanks!
回答1:
Found out the answers from wxWidget forum:
this->StatusBar->SetForegroundColour(wxColour(wxT("RED")));
wxStaticText* txt = new wxStaticText( this->StatusBar, wxID_ANY,wxT("Validation failed"), wxPoint(10, 5), wxDefaultSize, 0 );
txt->Show(true);
来源:https://stackoverflow.com/questions/3773281/how-to-change-statusbar-font-color-in-wxwidgets