wxChoice

wxChoice

wxChoice
Functions for wxChoice class

A choice item is used to select one of a list of strings. Unlike a wxListBox, only the selection is visible until the user pulls down the menu of choices.

Styles

This class supports the following styles:

See: wxListBox, wxComboBox, wxCommandEvent

This class is derived (and can use functions) from: wxControlWithItems wxControl wxWindow wxEvtHandler

wxWidgets docs: wxChoice

Event types emitted from this class: command_choice_selected

Default constructor.

See: create/7, wxValidator (not implemented in wx)

Destructor, destroying the choice item.

Types

This = wxChoice()

Deletes an item from the control.

The client data associated with the item will be also deleted if it is owned by the control. Note that it is an error (signalled by an assert failure in debug builds) to remove an item with the index negative or greater or equal than the number of items in the control.

If there is a currently selected item below the item being deleted, i.e. if wxControlWithItems:getSelection/1 returns a valid index greater than or equal to n, the selection is invalidated when this function is called. However if the selected item appears before the item being deleted, the selection is preserved unchanged.

See: wxControlWithItems:clear/1

Types

This = wxChoice()

Gets the number of columns in this choice item.

Remark: This is implemented for GTK and Motif only and always returns 1 for the other platforms.

Types

This = wxChoice()
Option = {n, integer()}

Sets the number of columns in this choice item.

Remark: This is implemented for GTK and Motif only and doesn’t do anything under other platforms.