Made wxWindow::HasScrollbar() do what it says.

Added wxWindow::CanScroll() with the old HasScrollbar() meaning but changed
HasScrollbar() to check for the scrollbar existence instead of just checking
if it might exist.

Closes #10897.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61634 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2009-08-10 11:18:09 +00:00
parent 4cd4a9ff70
commit c5cc7fbd27
4 changed files with 40 additions and 5 deletions

View File

@@ -377,7 +377,7 @@ public:
// acceptable size using which it will still look "nice" in
// most situations)
wxSize GetBestSize() const;
void GetBestSize(int *w, int *h) const
{
wxSize s = GetBestSize();
@@ -1160,13 +1160,16 @@ public:
// scrollbars
// ----------
// does the window have the scrollbar for this orientation?
bool HasScrollbar(int orient) const
// can the window have the scrollbar in this orientation?
bool CanScroll(int orient) const
{
return (m_windowStyle &
(orient == wxHORIZONTAL ? wxHSCROLL : wxVSCROLL)) != 0;
}
// does the window have the scrollbar in this orientation?
bool HasScrollbar(int orient) const;
// configure the window scrollbars
virtual void SetScrollbar( int orient,
int pos,