WxListBox

From WxWiki
Jump to navigation Jump to search

A simple wxListCtrl variant

See also: WxListCtrl

InsertItem

wxListBox comes with an `Insert' member. It is inherited from its parent's wxControlWithItems::Insert

  listBox->Insert(wxT("Foo"), 0);

Append

A quick insertion is done with ->Append(strAny). This is helpful along with control style wxLB_SORT.

SetSelection

You can select all the items in a wxListBox (if multiselection is enabled):

 for(size_t i = 0; i < listBox->GetCount(); i++)
    listBox->SetSelection(i, true);