Dropdown#
- class Dropdown#
A control for choosing one of a list of options, which are shown when it is clicked. Added to a
Canvasor aPanel.Base class:InputControlInherited Members
From
InputControl:changedFrom
Control:interactable,color,tooltipFrom
Object:rect_transform,layout_element,visible,remove()
- options#
The options that the dropdown offers.
- Attribute:
Can be read or written
- Return type:
list(str)
Note
Setting the options resets the selection to the first of them, or to nothing when the list is empty.
- selected_index#
The position in
Dropdown.optionsof the option that is chosen.- Attribute:
Can be read or written
- Return type:
int
Note
Zero while the dropdown has no options, as there is nothing to choose.