]> git.saurik.com Git - wxWidgets.git/commitdiff
Temporary fix for checklistbox refresh problem; setting the
authorJulian Smart <julian@anthemion.co.uk>
Thu, 9 Jun 2005 12:31:38 +0000 (12:31 +0000)
committerJulian Smart <julian@anthemion.co.uk>
Thu, 9 Jun 2005 12:31:38 +0000 (12:31 +0000)
background to a solid colour avoids incorrect paint code related to
notebook parent

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@34608 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/msw/checklst.cpp

index 7c928d371bc2ffd1d8adb50507be2291c20d640b..f9790875b9649d727dd0e02b3f611ba025fcfd91 100644 (file)
@@ -322,8 +322,14 @@ bool wxCheckListBox::Create(wxWindow *parent, wxWindowID id,
                             long style,
                             const wxValidator& validator, const wxString& name)
 {
-    return wxListBox::Create(parent, id, pos, size, n, choices,
-                             style | wxLB_OWNERDRAW, validator, name);
+    if (wxListBox::Create(parent, id, pos, size, n, choices,
+                             style | wxLB_OWNERDRAW, validator, name))
+    {
+        SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOW));
+        return true;
+    }
+    else
+        return false;
 }
 
 bool wxCheckListBox::Create(wxWindow *parent, wxWindowID id,
@@ -332,8 +338,14 @@ bool wxCheckListBox::Create(wxWindow *parent, wxWindowID id,
                             long style,
                             const wxValidator& validator, const wxString& name)
 {
-    return wxListBox::Create(parent, id, pos, size, choices,
-                             style | wxLB_OWNERDRAW, validator, name);
+    if (wxListBox::Create(parent, id, pos, size, choices,
+                             style | wxLB_OWNERDRAW, validator, name))
+    {
+        SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOW));
+        return true;
+    }
+    else
+        return false;
 }
 
 // misc overloaded methods