Skip to content

pyui.create_radio_button

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

Create a radio button for the user to select one of multiple options. After creating the radio button for the first option with this function, use create_linked_radio_button for the subsequent options. Use the set_control_checked function to initialize the radio button state.

Note that the drop list is another way to let the user select one of multiple options. The drop list is more compact but also more cumbersome to use.

pyui.create_radio_button(dialog, col_spec [,text])
dialog:create_radio_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 Initial text-content of the control

Return value

Type Description
control_handle A handle to the newly created control

Events

When the user changes the selected option of a radio button group, (e.g. by clicking on one button), the on_click handler for the newly selected option is called.

See also

Control Gallery, set_control_text, set_control_checked, set_on_click_handler, create_linked_radio_button, create_check_box, create_drop_list

Clone this wiki locally