diff --git a/include/wx/msw/scrolbar.h b/include/wx/msw/scrolbar.h index 6cae25208d..04e231de77 100644 --- a/include/wx/msw/scrolbar.h +++ b/include/wx/msw/scrolbar.h @@ -60,6 +60,9 @@ public: WXWORD pos, WXHWND control); protected: + + wxSize DoGetBestSize() const; + int m_pageSize; int m_viewSize; int m_objectSize; diff --git a/src/msw/scrolbar.cpp b/src/msw/scrolbar.cpp index c340e946f4..b0f7e5ffef 100644 --- a/src/msw/scrolbar.cpp +++ b/src/msw/scrolbar.cpp @@ -375,4 +375,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