Skip to content

pyui.create_droplist_button

fabian-flassig edited this page Jul 31, 2026 · 3 revisions

Create a button with an attached drop-down list. Clicking the button opens a list of options for the user to choose from. Use insert_control_item to populate the list and reset_content to clear it.

pyui.create_droplist_button(dialog, col_spec [,text])
dialog:create_droplist_button(col_spec [,text])

Parameters

Type Description
dialog dialog_handle Dialog where the control is created
col_spec integer or {first, last} Index of the column or specification of the column-span, where the control is placed.
text string Optional: Initial label of the button

Return value

Type Description
control_handle A handle to the newly created control

Events

When the user picks an option, the on_change handler is called on_change_handler(text, new_index) with the selected text and the index of the chosen option (see create_drop_list).

See also

Control Gallery, insert_control_item, set_control_selection, reset_content, set_on_change_handler, create_drop_list, create_button

Clone this wiki locally