]> git.saurik.com Git - wxWidgets.git/blobdiff - src/generic/scrlwing.cpp
removed wxArrayString casting hack, it doesn't work with the new wxString class
[wxWidgets.git] / src / generic / scrlwing.cpp
index 717187207d78eb3395d732d1b73aac93c983917d..d46d0a017cbd59d588bc94e069215d57622c365f 100644 (file)
@@ -1392,7 +1392,13 @@ bool wxScrolledWindow::Create(wxWindow *parent,
     MacSetClipChildren( true ) ;
 #endif
 
     MacSetClipChildren( true ) ;
 #endif
 
-    bool ok = wxPanel::Create(parent, id, pos, size, style|wxHSCROLL|wxVSCROLL, name);
+    // by default, we're scrollable in both directions (but if one of the
+    // styles is specified explicitly, we shouldn't add the other one
+    // automatically)
+    if ( !(style & (wxHSCROLL | wxVSCROLL)) )
+        style |= wxHSCROLL | wxVSCROLL;
+
+    bool ok = wxPanel::Create(parent, id, pos, size, style, name);
 
     return ok;
 }
 
     return ok;
 }