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
This commit is contained in:
@@ -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();
|
||||
|
||||
|
@@ -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
|
||||
}
|
||||
|
||||
/*
|
||||
|
Reference in New Issue
Block a user