From bb29edfaa28f769eb7ff007084e3f95ffe5b4037 Mon Sep 17 00:00:00 2001 From: Kevin Ollivier Date: Fri, 1 Dec 2006 20:31:25 +0000 Subject: [PATCH] Allow wxGenericListCtrl to correctly handle Get/SetScrollPos [bug 1584099]. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@43734 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/generic/listctrl.h | 3 +++ src/generic/listctrl.cpp | 10 ++++++++++ 2 files changed, 13 insertions(+) diff --git a/include/wx/generic/listctrl.h b/include/wx/generic/listctrl.h index 07cec7f0c8..19e874c53e 100644 --- a/include/wx/generic/listctrl.h +++ b/include/wx/generic/listctrl.h @@ -183,6 +183,9 @@ public: virtual bool SetFont( const wxFont &font ); virtual bool SetCursor( const wxCursor &cursor ); + virtual int GetScrollPos(int orient) const; + virtual void SetScrollPos(int orient, int pos, bool refresh = true); + #if wxUSE_DRAG_AND_DROP virtual void SetDropTarget( wxDropTarget *dropTarget ); virtual wxDropTarget *GetDropTarget() const; diff --git a/src/generic/listctrl.cpp b/src/generic/listctrl.cpp index 152e440036..0b7905dcf3 100644 --- a/src/generic/listctrl.cpp +++ b/src/generic/listctrl.cpp @@ -5225,6 +5225,16 @@ wxColour wxGenericListCtrl::GetItemBackgroundColour( long item ) const return info.GetBackgroundColour(); } +int wxGenericListCtrl::GetScrollPos( int orient ) const +{ + return m_mainWin->GetScrollPos( orient ); +} + +void wxGenericListCtrl::SetScrollPos( int orient, int pos, bool refresh ) +{ + m_mainWin->SetScrollPos( orient, pos, refresh ); +} + void wxGenericListCtrl::SetItemFont( long item, const wxFont &f ) { wxListItem info;