add a new option (segment) to the button
id | id | ID of the new option |
value | any | value of the new option |
show | boolean | makes the newly added option active. 'false' by default |
index | number | position to insert to. Last, by default |
$$("tabs").addOption(10, "New title", true);
In case of a tabbar, the method can as well take a more extensive option configuration of a tab.
And the parameters are as follows:
tabbar.addOption({id:1, value:"New", close:true, icon:"cog"}, true);