Inheritance diagram for wx.Choice:
A choice item is used to select one of a list of strings. Unlike a listbox, only the selection is visible until the user pulls down the menu of choices.
See also
Event Name | Description |
---|---|
wx.EVT_CHOICE(id, func) | Process a wx.wxEVT_COMMAND_CHOICE_SELECTED event, when an item on the list is selected. |
Create and show a wx.Choice control.
Parameters:
Returns:
Unlike GetSelection which only returns the accepted selection value, i.e. the selection in the control once the user closes the dropdown list, this function returns the current selection. That is, while the dropdown list is shown, it returns the currently selected item in it. When it is not shown, its result is the same as for the other function.
This function is new since wxWidgets version 2.6.2 (before this version GetSelection itself behaved like this).
Returns:
int