Contents Up Previous Next

wxChoice is-a wxItem

A wxChoice item is similar to a single-selection wxListBox but normally only the current selection is displayed. It must be the child of a wxPanel.

wxChoice values
wxChoice create
wxChoice append
wxChoice find-string
wxChoice clear
wxChoice get-selection
wxChoice get-string-selection
wxChoice set-selection
wxChoice set-string-selection
wxChoice get-string


wxChoice values

multifield values

List of string values for initializing the wxChoice item.


wxChoice create

bool ( wxChoice create)

Creates a choice item on the given panel. A choice consists of a list of strings, one of which may be selected and displayed at any one time. The following slots may be initialized.

Note that under Motif, it is recommended that the values are passed in this function, rather than using append, because of the nature of Motif. Otherwise, things are likely to be messed up.


wxChoice append

bool ( append string item)

Appends the string item to the choice.


wxChoice find-string

long ( find-string string item)

Searches for the given string and if found, returns the position ID of the string.


wxChoice clear

bool ( clear)

Clears all the strings from the choice item.


wxChoice get-selection

long ( get-selection)

Get the ID of the string currently selected.


wxChoice get-string-selection

string ( get-string-selection)

Get the string currently selected.


wxChoice set-selection

bool ( set-selection long item-id)

Sets the choice selection to the given item ID (numbered from zero).


wxChoice set-string-selection

bool ( set-string-selection string item)

Sets the selection by passing the appropriate item string.


wxChoice get-string

string ( get-string long item-id)

Gets the string associated with the given item ID.