wxChoice wrong border color in dark mode (wxMSW) (Issue #26775)

8 views
Skip to first unread message

BazaarAcc32

unread,
Aug 3, 2026, 8:34:19 AM (yesterday) Aug 3
to wx-...@googlegroups.com, Subscribed
BazaarAcc32 created an issue (wxWidgets/wxWidgets#26775)

It seems like wxChoice's border color is too light in dark mode. It would be nice if the border color matched wxTextCtrl's.

You can see result in this image
choice_border.png (view on web)

To reproduce

#include <wx/wx.h>
#include <wx/choice.h>

class MyFrame : public wxFrame
{
public:
    MyFrame()
        : wxFrame(nullptr, wxID_ANY, "wxChoice Demo", wxDefaultPosition, wxSize(320, 100))
    {
        auto* panel = new wxPanel(this);

        auto* choice = new wxChoice(panel, wxID_ANY);
        choice->Append("One");
        choice->Append("Two");
        choice->Append("Three");
        choice->SetSelection(0);

        auto* text = new wxTextCtrl(panel, wxID_ANY, "Value");

        auto* sizer = new wxBoxSizer(wxHORIZONTAL);
        sizer->Add(choice, 0, wxRIGHT, 1);
        sizer->Add(text, 1);

        panel->SetSizer(sizer);
    }
};

class MyApp : public wxApp
{
public:
    bool OnInit() override
    {
        MSWEnableDarkMode(wxApp::DarkMode_Always);

        auto* frame = new MyFrame();
        frame->Show();

        return true;
    }
};

wxIMPLEMENT_APP(MyApp);

OS: Windows 11
wxWidgets: 3.3.3, wxMSW


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/26775@github.com>

Steve Cornett

unread,
12:36 PM (1 hour ago) 12:36 PM
to wx-...@googlegroups.com, Subscribed
stevecor left a comment (wxWidgets/wxWidgets#26775)

The borders on different controls are not intended to match. The OS determines the border on the wxChoice. Starting with d5aacc4, the default border on wxTextCtrl is intended to match WinUI 3, which is the native appearance for an edit control and is even more different. The wxChoice control does not respond to border styles, so to change it, you would have to custom draw borders.


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/26775/5181927129@github.com>

VZ

unread,
12:39 PM (1 hour ago) 12:39 PM
to wx-...@googlegroups.com, Subscribed
vadz left a comment (wxWidgets/wxWidgets#26775)

I'm actually sympathetic to the argument about matching border colours. You quite often have a text control and some other control side by side and it does look bad if they use mismatching colours. I guess in WinUI 3 everything else uses the same colour as the edit control, but this is not the case for us, so I think that it might be better to make wxTextCtrl match them.


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/26775/5181952857@github.com>

Steve Cornett

unread,
1:06 PM (27 minutes ago) 1:06 PM
to wx-...@googlegroups.com, Subscribed
stevecor left a comment (wxWidgets/wxWidgets#26775)

The WinUI 3 appearance is the current proper native appearance for Windows apps whereas the UxTheme system is pretty haphazard for dark mode. The wxChoice control is the one that looks bad, not wxTextCtrl. If we make a correction, it should be to make wxChoice look like WinUI 3:

image.png (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/26775/5182230748@github.com>

Reply all
Reply to author
Forward
0 new messages