diff --git a/contrib/include/wx/gizmos/splittree.h b/contrib/include/wx/gizmos/splittree.h index c6cd5896ad..2e9dd678ec 100644 --- a/contrib/include/wx/gizmos/splittree.h +++ b/contrib/include/wx/gizmos/splittree.h @@ -80,6 +80,13 @@ public: // In case we're using the generic tree control. virtual int GetScrollPos(int orient) const; + // Override to suppress vertical scrollbar + virtual void SetScrollbar(int orient, + int pos, + int thumbVisible, + int range, + bool update); + //// Helpers void HideVScrollbar(); diff --git a/contrib/src/gizmos/splittree.cpp b/contrib/src/gizmos/splittree.cpp index 0eaed896c2..6c8120b28c 100644 --- a/contrib/src/gizmos/splittree.cpp +++ b/contrib/src/gizmos/splittree.cpp @@ -98,6 +98,19 @@ void wxRemotelyScrolledTreeCtrl::HideVScrollbar() #endif } +void wxRemotelyScrolledTreeCtrl::SetScrollbar(int orient, + int pos, + int thumbVisible, + int range, + bool update) +{ +#ifndef __WXMSW__ + if (orient == wxVERTICAL) + range = 0; +#endif + wxWindow::SetScrollbar(orient, pos, thumbVisible, range, update); +} + // Number of pixels per user unit (0 or -1 for no scrollbar) // Length of virtual canvas in user units // Length of page in user units @@ -447,6 +460,10 @@ void wxRemotelyScrolledTreeCtrl::OnScroll(wxScrollWinEvent& event) scrollWin->GetViewStart(& x, & y); ScrollToLine(-1, y); + +#ifndef __WXMSW__ + m_yScrollPosition = GetScrollPos(wxVERTICAL); +#endif } /*