Check documentation for the latest version of dhtmlxSuite Configuring Tabs DHTMLX Docs

Configuring Tabs

Adding /Removing Tab

To add tabs use the following configuration:

var myRibbon, data = {
    tabs : [
        {
            id : "tab_1",
            text : "tab #1",
            active : true,
            items : []
        },
        {
            id : "tab_2",
            text : "tab #2",
            items : []
        },
        {
            id : "tab_3",
            text : "tab #3",
            items : []
        }
    ]
};
myRibbon = new dhtmlXRibbon(data);

Related sample:  Init from object


To remove a tab from ribbon use the close() method:

myRibbon.tabs(id).close();

Related sample:  Close (remove) tab

Showing/Hiding Existing Tab

To show a tab use the show() method:

myRibbon.tabs(id).show();

To hide a tab use the hide() method:

myRibbon.tabs(id).hide();

Related sample:  Show / Hide

Disabling/Enabling Tab

To disable a tab use the disable() method:

myTabbar.tabs(id).disable();

To enable a tab use the enable() method:

myTabbar.tabs(id).enable();

Related sample:  Enable / Disable

Back to top