scrolling fix

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@49301 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Stefan Csomor
2007-10-21 18:11:01 +00:00
parent 2144aae383
commit 9b7384b523

View File

@@ -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 );
}