Make wxWindow::HasScrollbar() respect wxScrolled::ShowScrollbars().

Override CanScroll() in wxScrolled to return the real state of the scrollbar
instead of just relying on the wx[HV]SCROLL styles.

Closes #15440.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74714 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2013-08-27 13:12:38 +00:00
parent 3d777efedc
commit 029a401d74
7 changed files with 39 additions and 0 deletions

View File

@@ -1201,6 +1201,14 @@ wxScrollHelper::wxScrollHelper(wxWindow *winToScroll)
m_yVisibility = wxSHOW_SB_DEFAULT;
}
bool wxScrollHelper::IsScrollbarShown(int orient) const
{
wxScrollbarVisibility visibility = orient == wxHORIZONTAL ? m_xVisibility
: m_yVisibility;
return visibility != wxSHOW_SB_NEVER;
}
void wxScrollHelper::DoShowScrollbars(wxScrollbarVisibility horz,
wxScrollbarVisibility vert)
{