adds a new tab to Tabbar
id | string|number | tab id |
text | string | tab text |
width | number | (optional) tab width, null by default, if not number - will be adjusted automatically |
position | number | (optional) tab position, null by default (last tab) |
active | boolean | (optional) set to true to select the added tab, false by default |
close | boolean | (optional) set to true to render the Close button, false by default, overrides enableTabCloseButton() |
var myTabbar = new dhtmlXTabBar("parentId");
// closable, autowidth, select after add
myTabbar.addTab("a1", "Rage", null, null, true, true);
// simple tab
myTabbar.addTab("a2", "Motorhead");
// fixed width, 1st in a row, not active,
// not closable even if enableTabCloseButton() set to true
myTabbar.addTab("a3", "Poisonblack", 300, 0, false, false);
The "active" and "close" parameters are added in v4.0.
The "row" param (index of a row) is no longer used, 4.0 tabbar has only 1 row.
Back to top