8 Mar 2009 1:30 PM #1
how to deactivate all tabs
In a TabPanel's config, if you do not set the activeTab option, it is initially rendered without any of the tabs activated. Is there a way to return the tabs to that state?
8 Mar 2009 1:42 PM #2
I do not see anything like that in the source code. As to content you could simulate it by hiding the active tab's body, I don't know how to handle the tab strip.
8 Mar 2009 1:54 PM #3
I hacked it (for now) by using creating a dummy tab as the last tab in the tabPanel. Using CSS, I set the tab's display to none so it is never displayed in the tab strip. Then when I need to deactivate all of the tabs, I activate the dummy/hidden tab using setActiveTab.
A few follow-up questions:
- I thought I would be able to hide the tab by setting the config option, hidden: true. This does not hide the tab or its body. Am I using it incorrectly?
- When the tabs are rendered, the containing <li> element has a blank class attribute. How can I add a value for that?
Ex: I'd likeHTML Code:
<li id="parent2__child_dummy" class="">HTML Code:
<li id="parent2__child_dummy" class="x-hidden">