fixes SetFirstItem, Thanks to David Wright
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71414 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -133,6 +133,11 @@ void wxListBox::FreeData()
|
|||||||
|
|
||||||
void wxListBox::DoSetFirstItem(int n)
|
void wxListBox::DoSetFirstItem(int n)
|
||||||
{
|
{
|
||||||
|
// osx actually only has an implementation for ensuring the visibility of a row, it does so
|
||||||
|
// by scrolling the minimal amount necessary from the current scrolling position.
|
||||||
|
// in order to get the same behaviour I'd have to make sure first that the last line is visible,
|
||||||
|
// followed by a scrollRowToVisible for the desired line
|
||||||
|
GetListPeer()->ListScrollTo( GetCount()-1 );
|
||||||
GetListPeer()->ListScrollTo( n );
|
GetListPeer()->ListScrollTo( n );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user