diff --git a/include/wx/window.h b/include/wx/window.h index bdb96cdcad..199c4b7ef3 100644 --- a/include/wx/window.h +++ b/include/wx/window.h @@ -1221,11 +1221,7 @@ public: // ---------- // can the window have the scrollbar in this orientation? - bool CanScroll(int orient) const - { - return (m_windowStyle & - (orient == wxHORIZONTAL ? wxHSCROLL : wxVSCROLL)) != 0; - } + virtual bool CanScroll(int orient) const; // does the window have the scrollbar in this orientation? bool HasScrollbar(int orient) const; diff --git a/src/common/wincmn.cpp b/src/common/wincmn.cpp index 5d50b212b2..ebee014cd9 100644 --- a/src/common/wincmn.cpp +++ b/src/common/wincmn.cpp @@ -1113,6 +1113,12 @@ void wxWindowBase::SendSizeEventToParent(int flags) parent->SendSizeEvent(flags); } +bool wxWindowBase::CanScroll(int orient) const +{ + return (m_windowStyle & + (orient == wxHORIZONTAL ? wxHSCROLL : wxVSCROLL)) != 0; +} + bool wxWindowBase::HasScrollbar(int orient) const { // if scrolling in the given direction is disabled, we can't have the