Set the radio button status

To set the radio button selected or not, like a checkbox, we can also use the following functions.

ui_set_checked(control, checked);

Return: True if successful

Argument control is the handle of ui_radio_create(...); function to be checked while the checked is boolean (true or false).

But you should be careful, because if you select more than two radio buttons in the same group can cause a malfunction.

optionMale = ui_radio_create(64, 100, ui_default, "Male");
optionFemale = ui_radio_create(64, 132, ui_default, "Female");

ui_set_checked (optionMale, checked);

Set the optionMale radio button as the default option selected.

results matching ""

    No results matching ""