A choice item (also often called a ‘dropdown’) 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. By using the client_data
functions inherited from ControlWithItems , ruby
objects can be associated with items within the dropdown.
There are no special styles for Choice.
See also window styles overview.
evt_choice(id) { | event | … } | Process a EVT_COMMAND_CHOICE_SELECTED event,when an item on the list is selected. |
ListBox, ComboBox,
CommandEvent
Constructor, creating and showing a choice.
Creates the choice for two-step construction. See Choice.new.
Deletes the item with the given index from the control.
Gets the number of columns in this choice item.
This is implemented for Motif only and always returns 1
for the other
platforms.
Unlike get_selection 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.
Sets the number of columns in this choice item.
This is implemented for Motif only and doesn’t do anything under other
platforms.
[This page automatically generated from the Textile source at 2023-06-03 08:07:41 +0000]