1

I am using Dojo tabContainer & contentPane. I want a tab which cannot be opened by clicking on it. Is this possible? Please help me.

Reporter
  • 3,897
  • 5
  • 33
  • 47
Samik Chattopadhyay
  • 1,820
  • 6
  • 23
  • 34

1 Answers1

3

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);
Community
  • 1
  • 1
Alex.Bullard
  • 5,533
  • 2
  • 25
  • 32