Generic widgets flickering (wxMSW) (Issue #26762)

20 views
Skip to first unread message

BazaarAcc32

unread,
Jul 31, 2026, 7:33:57 AM (4 days ago) Jul 31
to wx-...@googlegroups.com, Subscribed
BazaarAcc32 created an issue (wxWidgets/wxWidgets#26762)

Bug description:

I'm using wxDataViewTreeCtrl and wxAuiNotebook in my code. I've noticed that both of these widgets flicker under the following conditions:

  1. wxDataViewTreeCtrl flickers when the main window width is changed. Sometimes the flickering also occurs when expanding/collapsing tree items.
  2. wxAuiNotebook tabs flicker when the mouse cursor hovers over the tab bar buttons.

Sometimes the flickering doesn't occur immediately; you need to perform the action several times in different directions for the problem to occur.

The problem occurs in both light and dark mode. I'd also like to point out that both of these controls are generic controls, at least in wxMSW.

Note: These issues only occur when SetDoubleBuffered(true) has been called on the wxFrame. If this isn't called, the flickering doesn't occur.

IMPORTANT: I ​​also notice flickering of tabs in wxAuiNotebook when the mouse cursor hovers over the buttons on the right side of the tab bar and under other conditions when SetDoubleBuffered(true) is not set on wxFrame. However, I cannot provide a reproducible example, as this occurs in a project that consists of many thousands of lines of code, and I currently have no idea what is causing this flickering.

Expected vs observed behaviour:

I expect there to be no flickering

To Reproduce:

Here the code to reproduce the issue

#include <wx/wx.h>
#include <wx/aui/aui.h>
#include <wx/dataview.h>

class MainFrame : public wxFrame
{
public:
    MainFrame()
        : wxFrame(nullptr, wxID_ANY,
            "wxAuiNotebook with Tree",
            wxDefaultPosition,
            wxSize(900, 600))
    {
        m_notebook = new wxAuiNotebook(
            this,
            wxID_ANY,
            wxDefaultPosition,
            wxDefaultSize,
            wxAUI_NB_TAB_MOVE |
            wxAUI_NB_SCROLL_BUTTONS |
            wxAUI_NB_TOP |
            wxAUI_NB_CLOSE_BUTTON |
            wxAUI_NB_WINDOWLIST_BUTTON
        );

        AddPage("Welcome", "Hello wxWidgets!");
        AddPage("Settings", "Settings page");
        AddPage("Console", "Console output");


        m_tree = new wxDataViewTreeCtrl(
            this,
            wxID_ANY,
            wxDefaultPosition,
            wxDefaultSize,
            wxDV_ROW_LINES |
            wxDV_VERT_RULES
        );

        wxDataViewItem root = m_tree->AppendContainer(
            wxDataViewItem(nullptr),
            "Folders"
        );

        for (int i = 1; i <= 10; i++)
        {
            m_tree->AppendContainer(
                root,
                wxString::Format("Folder %d", i)
            );
        }

        m_tree->Expand(root);


        wxBoxSizer* mainSizer = new wxBoxSizer(wxHORIZONTAL);
        mainSizer->Add(m_tree, 1, wxEXPAND);
        mainSizer->Add(m_notebook, 1, wxEXPAND);

        SetSizer(mainSizer);

        Centre();
    }

private:

    wxAuiNotebook* m_notebook;
    wxDataViewTreeCtrl* m_tree;


    void AddPage(
        const wxString& title,
        const wxString& text)
    {
        wxPanel* panel = new wxPanel(m_notebook);

        wxBoxSizer* sizer = new wxBoxSizer(wxVERTICAL);

        wxStaticText* label =
            new wxStaticText(
                panel,
                wxID_ANY,
                text
            );

        sizer->Add(
            label,
            0,
            wxALL,
            20
        );

        panel->SetSizer(sizer);

        m_notebook->AddPage(
            panel,
            title,
            true
        );
    }
};

class MyApp : public wxApp
{
public:

    bool OnInit() override
    {
        //MSWEnableDarkMode(wxApp::DarkMode_Always);

        MainFrame* frame = new MainFrame();
        frame->SetDoubleBuffered(true);
        frame->Show();

        return true;
    }
};

wxIMPLEMENT_APP(MyApp);

Platform and version information

  • wxWidgets version you use: wx 3.3.0
  • wxWidgets port you use: wxMSW
  • OS and its version: Windows 11


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

VZ

unread,
Jul 31, 2026, 7:37:29 AM (4 days ago) Jul 31
to wx-...@googlegroups.com, Subscribed
vadz left a comment (wxWidgets/wxWidgets#26762)

Could be the same as #26750.


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

BazaarAcc32

unread,
Aug 2, 2026, 7:00:45 AM (2 days ago) Aug 2
to wx-...@googlegroups.com, Subscribed
BazaarAcc32 left a comment (wxWidgets/wxWidgets#26762)

@vadz

Another important note: Sometimes even wxSearchCtrl flickers when the mouse cursor hovers over it. I'm having trouble providing a reproducible example because I don't currently understand what's causing the flickering.


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

PB

unread,
Aug 2, 2026, 7:20:03 AM (2 days ago) Aug 2
to wx-...@googlegroups.com, Subscribed
PBfordev left a comment (wxWidgets/wxWidgets#26762)

I assume wxWidgets 3.3.0 is a typo and you are using 3.3.3.

Not only is the version outdated but there is an important difference since 3.3.0 introduced using native double buffering on Windows (WS_EX_COMPOSITED) but it was problematic and it is not used since 3.3.2.


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

BazaarAcc32

unread,
Aug 2, 2026, 7:28:22 AM (2 days ago) Aug 2
to wx-...@googlegroups.com, Subscribed
BazaarAcc32 left a comment (wxWidgets/wxWidgets#26762)

@PBfordev No, there is no typo. I'm using 3.3.0


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

VZ

unread,
Aug 2, 2026, 7:34:28 AM (2 days ago) Aug 2
to wx-...@googlegroups.com, Subscribed

Closed #26762 as not planned.


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/26762/issue_event/28845920407@github.com>

VZ

unread,
Aug 2, 2026, 7:34:30 AM (2 days ago) Aug 2
to wx-...@googlegroups.com, Subscribed
vadz left a comment (wxWidgets/wxWidgets#26762)

Well, you really shouldn't, and there is no chance anything is ever going to be fixed in that version. You should have no issues upgrading to 3.3.3, so please do this and reopen the issue if you still see problems in it.


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

BazaarAcc32

unread,
Aug 2, 2026, 8:32:02 AM (2 days ago) Aug 2
to wx-...@googlegroups.com, Subscribed
BazaarAcc32 left a comment (wxWidgets/wxWidgets#26762)

@vadz
There is no flickering after upgrading to 3.3.3.
Many thanks!


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

Reply all
Reply to author
Forward
0 new messages