Selecting an item
We can choose one item that we want as default item selected with the following function.
ui_item_set_selected (control, index);
Return: True if successful
Argument control is the handle of ui_select_create(...); function you want to display. While the index is an index of the item you want to select.
selectCountry = ui_select_create (32, 64, ui_default, ui_default, "Country");
ui_item_add (selectCountry, "Indonesia");
ui_item_add (selectCountry, "Malaysia");
ui_item_add (selectCountry, "Thailand");
ui_item_add (selectCountry, "Vietnam");
ui_item_add (selectCountry, "Singapore");
ui_set_selected (selectCountry, 1);
Selecting items to the index-1 that is "Malaysia" from select selectCountry.