Selecting an tab item

We can choose one item tab we want as default item selected tab with the following function.

ui_item_set_selected (control, index);

Return: True if successful

Argument control is the handle of ui_tab_create(...); function. While the index is an index tab you want to select.

tabMenu = ui_tab_create (16, 64, 320, 32, 256);
ui_item_add (tab, "Armor");
ui_item_add (tab, "Weapon");
ui_item_add (tab, "Item");
ui_set_selected (tabMenu, 1);

Selects or activates tabs index-1 of tabMenu tab.

results matching ""

    No results matching ""