]> git.saurik.com Git - wxWidgets.git/commitdiff
Fixed wxTreeCtrl to use the proper bacground color from
authorRobin Dunn <robin@alldunn.com>
Sat, 18 Sep 1999 00:10:03 +0000 (00:10 +0000)
committerRobin Dunn <robin@alldunn.com>
Sat, 18 Sep 1999 00:10:03 +0000 (00:10 +0000)
SystemSettings, and changed how wxListCtrl used SystemSettings
too (static method doesn't need an instance.)

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

src/msw/listctrl.cpp
src/msw/treectrl.cpp

index 66b7a509b181edcdf75c8cab049704398c13ab85..afc8bb65ed35a000257c1c82d20cb5edc4ab748c 100644 (file)
@@ -174,8 +174,7 @@ bool wxListCtrl::DoCreateControl(int x, int y, int w, int h)
     }
 #endif // ListView_SetExtendedListViewStyle
 
-    wxSystemSettings settings;
-    SetBackgroundColour(settings.GetSystemColour(wxSYS_COLOUR_WINDOW));
+    SetBackgroundColour(wxSystemSettings::GetSystemColour(wxSYS_COLOUR_WINDOW));
     SetForegroundColour(GetParent()->GetForegroundColour());
 
     SubclassWin(m_hWnd);
index d9affa465f8abe62add4e730d9f73ead0609a336..ff98a5db0312902ffed5965872310c1f1e4bab9d 100644 (file)
@@ -212,9 +212,9 @@ bool wxTreeCtrl::Create(wxWindow *parent,
     if ( !MSWCreateControl(WC_TREEVIEW, wstyle) )
         return FALSE;
 
-    // the treectrl with any other background looks ugly because the items
-    // background is white anyhow
-    SetBackgroundColour(*wxWHITE);
+    SetBackgroundColour(wxSystemSettings::GetSystemColour(wxSYS_COLOUR_WINDOW));
+    SetForegroundColour(wxWindow::GetParent()->GetForegroundColour());
+
 
     // VZ: this is some experimental code which may be used to get the
     //     TVS_CHECKBOXES style functionality for comctl32.dll < 4.71.