#include "wx/scrolbar.h"
#include "wx/msw/private.h"
+#include "wx/settings.h"
#if wxUSE_EXTENDED_RTTI
WX_DEFINE_FLAGS( wxScrollBarStyle )
wxPROPERTY( Range , int , SetRange, GetRange, 0 , 0 /*flags*/ , wxT("Helpstring") , wxT("group"))
wxPROPERTY( ThumbSize , int , SetThumbSize, GetThumbSize, 0 , 0 /*flags*/ , wxT("Helpstring") , wxT("group"))
wxPROPERTY( PageSize , int , SetPageSize, GetPageSize, 0 , 0 /*flags*/ , wxT("Helpstring") , wxT("group"))
- wxPROPERTY_FLAGS( WindowStyle , wxScrollBarStyle , long , SetWindowStyleFlag , GetWindowStyleFlag , , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) // style
+ wxPROPERTY_FLAGS( WindowStyle , wxScrollBarStyle , long , SetWindowStyleFlag , GetWindowStyleFlag , EMPTY_MACROVALUE , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) // style
wxEND_PROPERTIES_TABLE()
wxBEGIN_HANDLERS_TABLE(wxScrollBar)
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