nanome.api.ui.dropdown module

class Dropdown[source]

Bases: nanome._internal.ui.models._Dropdown, nanome.api.ui.ui_base.UIBase

Represents a dropdown menu
items
A list of DropdownItems in the list
Type:list <DropdownItem>
max_displayed_items
The maximum number of items to display at a time
If there are more items in the dropdown than this value,
a scrollbar will be appear on the dropdown.
Type:int
permanent_title
The permanent text to display over the Dropdown’s selected item area.
Type:str
register_item_clicked_callback(func)[source]
Registers a function to be called when a dropdown item is pressed
Parameters:func (method (Dropdown, DropdownItem) -> None) – called when a dropdown item is pressed
use_permanent_title
Whether or not to display permanent text where the Dropdown would otherwise display the selected item
Type:bool