Reputation: 1860
I am using Dojo tabContainer & contentPane. I want a tab which cannot be opened by clicking on it. Is this possible? Please help me.
Upvotes: 1
Views: 2144
Reputation: 5563
Apparently this is not currently possible to do though the tabContainer implementation (see here) but you could try some of the things suggested here
A suggested workaround from the enchancement page is :
wildbill noticed that in _TabButton.html, there is a connection that is not set up properly. The onclick:onClick part of the outermost dojoAttachEvent should actually be onclick:_onClick
So. With that fix in place, you can disable a tab using the original piece of code above. i.e. find the tab button by iterating over the registry and filtering it out. i.e.
var b;
dijit.registry.byClass("dijit.layout._TabButton").forEach(function(x) {if (x.label=="your tab button's label") b = x;});
//now disable it... b.setAttribute('disabled', true);
Upvotes: 3