X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/69fa3d26d3add4f53310e1b2486d1bed11dec33b..ab67e8874db324fab5223cc8d5dff8a8de3e2b77:/src/osx/listbox_osx.cpp diff --git a/src/osx/listbox_osx.cpp b/src/osx/listbox_osx.cpp index 982dad0705..a6e8b51418 100644 --- a/src/osx/listbox_osx.cpp +++ b/src/osx/listbox_osx.cpp @@ -133,6 +133,11 @@ void wxListBox::FreeData() 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 ); }