Check documentation for the latest version of dhtmlxSuite enableTabCloseButton DHTMLX Docs

enableTabCloseButton

enables/disables a "close" button for tabs

void enableTabCloseButton(boolean mode);
modebooleantrue/false to enable/disable, disabled by default

Example

var myTabbar = new dhtmlXTabBar("parentId");
 
myTabbar.addTab("a1", "Rage"); // without close button
myTabbar.addTab("a2", "Motorhead", null, null, null, true); // with close button
 
// enable close button for new tabs
myTabbar.enableTabCloseButton(true);
 
myTabbar.addTab("a3", "Poisonblack"); // with close button
myTabbar.addTab("a4", "Manowar", null, null, null, false); // without close button

Details

affects only the tabs added after, can be overridden by "close" param in addTab()

Back to top