.section Widgets .topic widget.dropdown .title Dropdown .toc 0 Dropdown .index Dropdown .index wgtDropdown .index wgtDropdownSetItems .index wgtDropdownGetSelected .index wgtDropdownSetSelected .h2 Dropdown A drop-down list that displays a single selected item and expands to show all options when clicked. Read-only selection (the user cannot type into it). Header: widgets/widgetDropdown.h .h3 Creation .code WidgetT *dd = wgtDropdown(parent); const char *items[] = { "Red", "Green", "Blue" }; wgtDropdownSetItems(dd, items, 3); .endcode .h3 Macros .table Macro Description ----- ----------- wgtDropdown(parent) Create a dropdown list. wgtDropdownSetItems(w, items, count) Set the list of items. items is a const char ** array. wgtDropdownGetSelected(w) Get the index of the selected item (-1 if none). wgtDropdownSetSelected(w, idx) Set the selected item by index. .endtable .h3 Events .table Callback Description -------- ----------- onChange Fires when the selected item changes. .endtable .h3 Properties (BASIC Interface) .table Property Type Access Description -------- ---- ------ ----------- ListIndex Integer Read/Write Index of the currently selected item. .endtable