]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/scrolbar.cpp
Added SW_SCROLLCHILDREN to make scrolling work
[wxWidgets.git] / src / msw / scrolbar.cpp
index c340e946f438ae5634df5bfdec28a9638c82f682..50eb08ba2aa99d24dc12247d3bcfd2a122885a99 100644 (file)
@@ -28,6 +28,7 @@
 
 #include "wx/scrolbar.h"
 #include "wx/msw/private.h"
+#include "wx/settings.h"
 
 #if wxUSE_EXTENDED_RTTI
 WX_DEFINE_FLAGS( wxScrollBarStyle )
@@ -375,4 +376,21 @@ void wxScrollBar::Command(wxCommandEvent& event)
     ProcessCommand(event);
 }
 
+wxSize wxScrollBar::DoGetBestSize() const
+{
+    int w = 100;
+    int h = 100;
+
+    if ( IsVertical() )
+    {
+        w = wxSystemSettings::GetMetric(wxSYS_VSCROLL_X);
+    }
+    else
+    {
+        h = wxSystemSettings::GetMetric(wxSYS_HSCROLL_Y);
+    }
+
+    return wxSize(w, h);
+}
+
 #endif // wxUSE_SCROLLBAR