]> git.saurik.com Git - wxWidgets.git/blobdiff - src/generic/panelg.cpp
Only call Select within SetString when internal data has been restored,
[wxWidgets.git] / src / generic / panelg.cpp
index 81e5700262bb6b6ee903e651d9ceb2e2699bb0ba..3bb937f34935ac6dc6644c029335d85995838cbf 100644 (file)
@@ -121,7 +121,15 @@ bool wxPanel::Create(wxWindow *parent, wxWindowID id,
                      long style,
                      const wxString& name)
 {
-    return wxWindow::Create(parent, id, pos, size, style, name);
+    if ( !wxWindow::Create(parent, id, pos, size, style, name) )
+        return false;
+
+#ifdef __WXMSW__
+    // panels don't have the same colour as normal windows under Windows
+    SetDefaultBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_3DFACE));
+#endif // __WXMSW__
+
+    return true;
 }
 
 wxPanel::~wxPanel()