// Author: Stefan Csomor
// Modified by:
// Created: 1998-01-01
-// RCS-ID: $Id: listbox.cpp 54820 2008-07-29 20:04:11Z SC $
+// RCS-ID: $Id$
// Copyright: (c) Stefan Csomor
// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
return GetListPeer()->ListGetSelection();
}
+int wxListBox::DoListHitTest(const wxPoint& inpoint) const
+{
+ return GetListPeer()->DoListHitTest( inpoint );
+}
+
// ----------------------------------------------------------------------------
// display
// ----------------------------------------------------------------------------
GetListPeer()->UpdateLineToEnd(startpos);
+ // Inserting the items may scroll the listbox down to show the last
+ // selected one but we don't want to do it as it could result in e.g. the
+ // first items of a listbox be hidden immediately after its creation so
+ // show the first selected item instead. Ideal would probably be to
+ // preserve the old selection unchanged, in fact, but I don't know how to
+ // get the first visible item so for now do at least this.
+ SetFirstItem(startpos);
+
UpdateOldSelections();
return idx;