From fa0c9287979aa7beee38cf58c2667a855a789738 Mon Sep 17 00:00:00 2001 From: Julian Smart Date: Thu, 10 Jan 2008 19:57:35 +0000 Subject: [PATCH] Fixes for split tree when using generic tree control git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@51154 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- contrib/include/wx/gizmos/splittree.h | 7 +++++++ contrib/src/gizmos/splittree.cpp | 17 +++++++++++++++++ 2 files changed, 24 insertions(+) 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 } /*