Dropdown#
- public 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:getChanged,setChangedFrom
Control:getInteractable,setInteractable,getColor,setColor,getTooltip,setTooltipFrom
Object:getRectTransform,getLayoutElement,getVisible,setVisible,remove
- void setOptions(java.util.List<String> value)#
The options that the dropdown offers.
Note
Setting the options resets the selection to the first of them, or to nothing when the list is empty.
- int getSelectedIndex()#
- void setSelectedIndex(int value)#
The position in
Dropdown.getOptions()of the option that is chosen.Note
Zero while the dropdown has no options, as there is nothing to choose.