From e3726cf6c9ebdd1d1193aa77f7bda4123ee32600 Mon Sep 17 00:00:00 2001 From: Julian Smart Date: Mon, 14 Jan 2008 15:56:48 +0000 Subject: [PATCH] More split tree fixes git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@51209 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- contrib/src/gizmos/splittree.cpp | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/contrib/src/gizmos/splittree.cpp b/contrib/src/gizmos/splittree.cpp index 6c8120b28c..8f5ed67f10 100644 --- a/contrib/src/gizmos/splittree.cpp +++ b/contrib/src/gizmos/splittree.cpp @@ -98,6 +98,26 @@ void wxRemotelyScrolledTreeCtrl::HideVScrollbar() #endif } +void wxRemotelyScrolledTreeCtrl::DoCalcScrolledPosition(int x, int y, int *xx, int *yy) const +{ +#if USE_GENERIC_TREECTRL || !defined(__WXMSW__) + if (IsKindOf(CLASSINFO(wxGenericTreeCtrl))) + { + wxGenericTreeCtrl* win = (wxGenericTreeCtrl*) this; + * yy = 0; + int yyy; + win->wxGenericTreeCtrl::DoCalcScrolledPosition(x, y, xx, & yyy); + + wxScrolledWindow* scrolledWindow = GetScrolledWindow(); + if (scrolledWindow) + { + int xxx; + scrolledWindow->DoCalcScrolledPosition(x, y, & xxx, yy); + } + } +#endif +} + void wxRemotelyScrolledTreeCtrl::SetScrollbar(int orient, int pos, int thumbVisible, @@ -132,7 +152,7 @@ void wxRemotelyScrolledTreeCtrl::SetScrollbars( if (IsKindOf(CLASSINFO(wxGenericTreeCtrl))) { wxGenericTreeCtrl* win = (wxGenericTreeCtrl*) this; - win->wxGenericTreeCtrl::SetScrollbars(pixelsPerUnitX, pixelsPerUnitY, noUnitsX, 0, xPos, 0, /* noRefresh */ true); + win->wxGenericTreeCtrl::SetScrollbars(pixelsPerUnitX, pixelsPerUnitY, noUnitsX, noUnitsY, xPos, yPos, /* noRefresh */ true); wxScrolledWindow* scrolledWindow = GetScrolledWindow(); if (scrolledWindow)