From 9b7384b52301c04a7d14ca221e81f14183122c5c Mon Sep 17 00:00:00 2001 From: Stefan Csomor Date: Sun, 21 Oct 2007 18:11:01 +0000 Subject: [PATCH] scrolling fix git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@49301 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/mac/carbon/utils.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/mac/carbon/utils.cpp b/src/mac/carbon/utils.cpp index 3a7d88ddd9..a04b05437d 100644 --- a/src/mac/carbon/utils.cpp +++ b/src/mac/carbon/utils.cpp @@ -2265,7 +2265,15 @@ void * wxMacDataItemBrowserControl::MacGetClientData( unsigned int n) const void wxMacDataItemBrowserControl::MacScrollTo( unsigned int n ) { - RevealItem( GetItemFromLine( n) , kDataBrowserRevealWithoutSelecting ); + UInt32 top , left ; + GetScrollPosition( &top , &left ) ; + wxMacDataItem * item = (wxMacDataItem*) GetItemFromLine( n ); + + UInt16 height ; + GetRowHeight( (DataBrowserItemID) item , &height ) ; + SetScrollPosition( n * ((UInt32)height) , left ) ; + + RevealItem( item , kDataBrowserRevealWithoutSelecting ); }