.. default-domain:: java .. highlight:: java .. package:: krpc.client.services.UI Dropdown ======== .. type:: public class Dropdown A control for choosing one of a list of options, which are shown when it is clicked. Added to a :type:`Canvas` or a :type:`Panel`. | Base class: :type:`InputControl` .. container:: inherited-members .. rubric:: Inherited Members * From :type:`InputControl`: :meth:`getChanged `, :meth:`setChanged ` * From :type:`Control`: :meth:`getInteractable `, :meth:`setInteractable `, :meth:`getColor `, :meth:`setColor `, :meth:`getTooltip `, :meth:`setTooltip ` * From :type:`Object`: :meth:`getRectTransform `, :meth:`getLayoutElement `, :meth:`getVisible `, :meth:`setVisible `, :meth:`remove ` .. method:: java.util.List getOptions() .. method:: void setOptions(java.util.List 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. .. method:: int getSelectedIndex() .. method:: void setSelectedIndex(int value) The position in :meth:`Dropdown.getOptions()` of the option that is chosen. .. note:: Zero while the dropdown has no options, as there is nothing to choose.