A wxListBox displays a choice of strings. It must be the child of a panel or dialog box. In a single-selection listbox, only one choice may be highlighted. In a multiple-selection listbox, several may be highlighted.
wxListBox values
wxListBox multiple
wxListBox create
wxListBox append
wxListBox find-string
wxListBox clear
wxListBox get-selection
wxListBox get-string-selection
wxListBox set-selection
wxListBox set-string-selection
wxListBox number
wxListBox delete-item
wxListBox get-string
wxListBox get-first-selection
wxListBox get-next-selection
multifield values
List of string values for initializing the wxListBox item.
bool multiple
Initalize to TRUE for a multi-selection listbox, FALSE for a single-selection listbox.
void ( create)
Creates a list box item on the given panel or dialog box. The following slots may be initialized.
style is a bit list of some of the following:
wxNEEDED_SB | Create scrollbars if needed. |
wxALWAYS_SB | Create scrollbars immediately. |
wxHSCROLL | Create horizontal scrollbar if contents are two wide (Windows only). |
bool ( append string item optional string client-data)
Append a string to the list box, with an optional client data string.
long ( find-string string item)
Find the string in the list box and return the integer position if found, -1 if not.
bool ( clear)
Clear all strings from the list box.
long ( get-selection)
Get the position of the selection (for single-selection list boxes only).
string ( get-string-selection)
Get the selected string (for single-selection list boxes only).
bool ( set-selection long item-pos bool flag=TRUE)
Set a selection by item position.
If flag is TRUE, the item will be selected, otherwise it will be deselected (multiple-selection listboxes only).
bool ( set-string-selection string item)
Set a selection by string.
long ( number)
Return the number of items in the list box.
bool ( delete-item long item-pos)
Delete an item in the list box.
string ( get-string long item-pos)
Return the string at the given position.
long ( get-first-selection)
Get the first selection position in a multi-selection list box (-1 for no more selections).
long ( get-next-selection)
Get the next selection position in a multi-selection list box (-1 for no more selections).