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:
@@ -60,6 +60,9 @@ public:
|
|||||||
WXWORD pos, WXHWND control);
|
WXWORD pos, WXHWND control);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
|
wxSize DoGetBestSize() const;
|
||||||
|
|
||||||
int m_pageSize;
|
int m_pageSize;
|
||||||
int m_viewSize;
|
int m_viewSize;
|
||||||
int m_objectSize;
|
int m_objectSize;
|
||||||
|
@@ -375,4 +375,21 @@ void wxScrollBar::Command(wxCommandEvent& event)
|
|||||||
ProcessCommand(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
|
#endif // wxUSE_SCROLLBAR
|
||||||
|
Reference in New Issue
Block a user