From a83d0b0af68bf2deed53eb7b8373a885f4a7c0f7 Mon Sep 17 00:00:00 2001 From: Steve Cornett <21205494+stevecor@users.noreply.github.com> Date: Fri, 26 Jun 2026 11:22:21 -0700 Subject: [PATCH] Fix system colour change for wxVListBox Remove the background colour setting from wxVListBox::Create() so that the control uses the up-to-date background colour in the paint event handler. This way the control responds to system colour changes. The comment about transparent drawing is wrong since 0975a8a (Applied patch [ 1405821 ] wxVListBox double-buffering + fix to a scrolling issue By Jaakko Salli, 2006-01-17). Closes #26636. --- src/generic/vlbox.cpp | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/generic/vlbox.cpp b/src/generic/vlbox.cpp index 968a51fc9f..58f73253ed 100644 --- a/src/generic/vlbox.cpp +++ b/src/generic/vlbox.cpp @@ -82,10 +82,6 @@ bool wxVListBox::Create(wxWindow *parent, if ( style & wxLB_MULTIPLE ) m_selStore = new wxSelectionStore; - // make sure the native widget has the right colour since we do - // transparent drawing by default - SetBackgroundColour(GetBackgroundColour()); - // leave m_colBgSel in an invalid state: it means for OnDrawBackground() // to use wxRendererNative instead of painting selection bg ourselves m_colBgSel = wxNullColour;