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 );
}
void wxListBox::HandleLineEvent( unsigned int n, bool doubleClick )
{
- wxCommandEvent event( doubleClick ? wxEVT_COMMAND_LISTBOX_DOUBLECLICKED :
- wxEVT_COMMAND_LISTBOX_SELECTED, GetId() );
+ wxCommandEvent event( doubleClick ? wxEVT_LISTBOX_DCLICK :
+ wxEVT_LISTBOX, GetId() );
event.SetEventObject( this );
if ( HasClientObjectData() )
event.SetClientObject( GetClientObject(n) );