wxRichTextCtrl Dark mode of Windows 11 (Issue #27202)

47 views
Skip to first unread message

flywithmea

unread,
Oct 10, 2026, 2:26:50 PM (6 days ago) Oct 10
to wx-...@googlegroups.com, Subscribed
flywithmea created an issue (wxWidgets/wxWidgets#27202)
Dark mode of Windows 11. If the application is in light color when it starts, the system will switch to light color after it starts. The wxRichTextCtrl  will have a white frame. However, if the Dark mode is selected at startup, the display will function normally regardless of any subsequent color changes.

The version I'm using is 3.3.4.
Image: Image (view on web)

—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!
You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/issues/27202@github.com>

VZ

unread,
Oct 10, 2026, 2:56:06 PM (6 days ago) Oct 10
to wx-...@googlegroups.com, Subscribed
vadz left a comment (wxWidgets/wxWidgets#27202)

Can the problem be reproduced in the richtext sample? Do I understand correctly that to reproduce it you need to:

  1. Set Windows to use light mode.
  2. Run the sample.
  3. Switch Windows to dark mode.

?

—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/issues/27202/6101035317@github.com>

flywithmea

unread,
Oct 10, 2026, 11:26:27 PM (5 days ago) Oct 10
to wx-...@googlegroups.com, Subscribed
flywithmea left a comment (wxWidgets/wxWidgets#27202)

Yes, this way can reproduce the problem.

—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/issues/27202/6105006796@github.com>

Steve Cornett

unread,
Oct 11, 2026, 1:48:08 PM (5 days ago) Oct 11
to wx-...@googlegroups.com, Subscribed
stevecor left a comment (wxWidgets/wxWidgets#27202)

I cannot see a problem like this with the richtext sample. In your image, it seems the problematic white area surrounds the wxRichTextCtrl. Perhaps the wxRichTextCtrl is placed within another window and that is the window not updating upon switching from light to dark. In light mode, the default window background is gray and so it is common to have a call like below to make it white.

SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOW));

If your app does this, it should also have a system color change event handler (wxEVT_SYS_COLOUR_CHANGED) to repeat that setting.

It looks like there is also a problem with a different control, to the right of the Console text. It may be the same issue.

If this does not help, could you show a minimal example app that demonstrates the problem?

—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/issues/27202/6111881986@github.com>

flywithmea

unread,
Oct 13, 2026, 5:34:59 AM (3 days ago) Oct 13
to wx-...@googlegroups.com, Subscribed
flywithmea left a comment (wxWidgets/wxWidgets#27202)

I solved the problem and figured out what caused it. If the wxSplitterWindow component adds child windows one by one, only the first one added can automatically update the theme color. There will be no problem if they are added together.

Code segment 1 is abnormal, while code segment 2 is good.

code1:
UI_Frame_Main::UI_Frame_Main(wxWindow *parent)
: Frame_Main(parent)
{
m_Splitter_center = new wxSplitterWindow(m_panel_main, wxID_ANY,
wxDefaultPosition, wxDefaultSize,
wxSP_LIVE_UPDATE | wxSP_3DSASH | wxSP_3DBORDER);

    m_notebook_workspace = new wxNotebook( m_Splitter_center, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxNB_DEFAULT);
m_notebook_workspace->SetMinSize( wxSize( -1,100 ) );
m_notebook_console = new wxNotebook( m_Splitter_center, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxNB_BOTTOM );
m_notebook_console->SetMinSize( wxSize( -1,160 ) );

}
code 2:
UI_Frame_Main::UI_Frame_Main(wxWindow *parent)
: Frame_Main(parent)
{
m_Splitter_center = new wxSplitterWindow(m_panel_main, wxID_ANY,
wxDefaultPosition, wxDefaultSize,
wxSP_LIVE_UPDATE | wxSP_3DSASH | wxSP_3DBORDER);

m_notebook_workspace = new wxNotebook( m_Splitter_center, wxID_ANY, wxDefaultPosition, wxDefaultSize);
m_notebook_workspace->SetMinSize( wxSize( -1,100 ) );
m_notebook_console = new wxNotebook( m_Splitter_center, wxID_ANY, wxDefaultPosition, wxDefaultSize );
m_notebook_console->SetMinSize( wxSize( -1,160 ) );

m_Splitter_center->SplitHorizontally(m_notebook_workspace, m_notebook_console, 400);

}

—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/issues/27202/6142631129@github.com>

flywithmea

unread,
Oct 13, 2026, 9:41:11 AM (3 days ago) Oct 13
to wx-...@googlegroups.com, Subscribed

Closed #27202 as completed.

—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/issue/27202/issue_event/33138050044@github.com>

flywithmea

unread,
Oct 13, 2026, 9:41:18 AM (3 days ago) Oct 13
to wx-...@googlegroups.com, Subscribed
flywithmea left a comment (wxWidgets/wxWidgets#27202)

Sorry, It was my mistake in passing an incorrect parameter that caused the problem.
such as : m_notebook_console = new wxNotebook( m_Splitter_center, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxNB_BOTTOM );

—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/issues/27202/6146887115@github.com>

Reply all
Reply to author
Forward
0 new messages