///////////////////////////////////////////////////////////////////////////////
-// Name: src/osx/carbon/listbox.cpp
+// Name: src/osx/listbox_osx.cpp
// Purpose: wxListBox
// Author: Stefan Csomor
// Modified by:
DontCreatePeer();
m_blockEvents = false;
+ if ( ! (style & wxNO_BORDER) )
+ style = (style & ~wxBORDER_MASK) | wxSUNKEN_BORDER ;
+
wxASSERT_MSG( !(style & wxLB_MULTIPLE) || !(style & wxLB_EXTENDED),
wxT("only a single listbox selection mode can be specified") );
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 );
}