开发者

How to change StatusBar font color in wxWidgets?

开发者 https://www.devze.com 2023-01-17 17:47 出处:网络
I want to display an error message in red on status b开发者_运维知识库ar if a user action results in error. I have tried setting the forground color to red but the it still displays the message in def

I want to display an error message in red on status b开发者_运维知识库ar 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!


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);
0

精彩评论

暂无评论...
验证码 换一张
取 消