The current state of the button cannot display the correct color. (Issue #26453)

10 views
Skip to first unread message

MrWeiCodes

unread,
May 13, 2026, 6:39:15 AM (yesterday) May 13
to wx-...@googlegroups.com, Subscribed
MrWeiCodes created an issue (wxWidgets/wxWidgets#26453)

Platform and version information

  • wxWidgets version :3.3.3
  • wxWidgets port :wxMSW
  • OS:Windows 10
  • Controls:wxButton

Code:

wxButton* m_button_demo;
m_button_demo = new wxButton( m_sbSizer_src->GetStaticBox(), wxID_ANY, _("DemoButton"), wxDefaultPosition, wxDefaultSize, 0 );
m_button_demo->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL, false, wxEmptyString ) );
m_button_demo->SetForegroundColour( wxColour( 255, 0, 0) );

When the button state is normal or pressed, the text correctly displays the color wxColour(255, 0, 0) in red. However, when the mouse moves over the button (i.e., when the button is in the current state), the text color changes to black. In the previous version 3.3.0, the current state still correctly displayed the wxColour(255, 0, 0) color. This issue occurred after updating to version 3.3.3 (the master branch as of commits on May 13, 2026).


Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.
You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/issues/26453@github.com>

Reply all
Reply to author
Forward
0 new messages