implemented a simple DoGetBestSize() for MSW's wxScrollBar

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26677 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Dimitri Schoolwerth 2004-04-09 15:16:46 +00:00
parent 62ad15a5b2
commit caafd0821d
2 changed files with 20 additions and 0 deletions

View File

@ -60,6 +60,9 @@ public:
WXWORD pos, WXHWND control);
protected:
wxSize DoGetBestSize() const;
int m_pageSize;
int m_viewSize;
int m_objectSize;

View File

@ -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