PDA

View Full Version : How to re-show a closable Tab



dedoz
7 Jun 2012, 2:03 AM
i have a tabPanel with tabs and they are closable.
After i close a tab, what happens ?
a) tab control is destroyed and i have to rebuild it + add it to the tab panel again?
b) tab is just hidden and theres a way to re-show that tab ?

thanks.

friend
7 Jun 2012, 3:53 AM
If a tab is some component that's expensive to create or is a feature that's used heavily, I tend to do a hide/show on the tab.



someTab.tab.hide();
someTab.tab.show();


After calling hide(), you must set some other tab as 'active', otherwise the component associated with the hidden tab will still be displayed.

sword-it
7 Jun 2012, 3:55 AM
i have a tabPanel with tabs and they are closable.
After i close a tab, what happens ?
a) tab control is destroyed and i have to rebuild it + add it to the tab panel again?
b) tab is just hidden and theres a way to re-show that tab ?

thanks.

answer is (a)
tab control is destroyed and i have to rebuild it + add it to the tab panel again