Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如果用户操作导致错误,我想在状态栏上以红色显示错误消息。我尝试将前景色设置为红色,但它仍以默认黑色字体显示消息。如何使状态栏上的字体颜色变为红色?我在红帽 5.5 上使用 wxWidgets 2.8
谢谢!
从 wxWidget 论坛找到答案:
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);