proposed change to wxScrolledWindow

Stefan Csomor csomor at advancedconcepts.ch
Mon Jul 23 10:45:33 PDT 2007


Hi

I've received a change in another patch (1744665) which suggest the 
following change in generic/scrlwing.cpp

@@ -1360,7 +1360,12 @@
     MacSetClipChildren( true ) ;
 #endif
 
-    bool ok = wxPanel::Create(parent, id, pos, size, 
style|wxHSCROLL|wxVSCROLL, name);
+    if (style & (wxHSCROLL | wxVSCROLL) == 0)
+    {
+        // if neither scroll bars are specified, assume that both are 
desired
+        style |= wxHSCROLL | wxVSCROLL;
+    }
+    bool ok = wxPanel::Create(parent, id, pos, size, style, name);

allowing to use only one scrollbar in a scrolled window, is this 
something I should apply ? if yes to wx_2_8 or only to HEAD ? I'm 
hesitant as it changes behaviour of existing code, but I also see that 
it might be useful ....

Best,

Stefan








More information about the wx-dev mailing list