PDA

View Full Version : unhideTabStripItem show a blank page



mary1114
10 Aug 2012, 9:07 AM
Hi,

I have created 4 tabs and wanted to hide one of the tab after page render, so I add a listener and use the afterrrender function to hide the tab I wanted to hide using:

hideTabStripItem(tabIndex)

which works fine... but when I tried to display the hidden tab using:

unhideTabStripItem(tabIndex)

I get the tab alright but the contents of the tab is blank, basically I get a blank page none of the grids shows up. Any idea?

Appreciate any kind of help or guidance.

I am using ExtJS 3.4

Thanks

Mary

willigogs
10 Aug 2012, 9:18 AM
Instead of adding the tab and hiding it on initial page load - why don't you not add the tab at all, but instead create the tab and add it on your specified event?

mary1114
10 Aug 2012, 10:38 AM
Thank you for your response... That is not a bad idea, but how can I create a tab and added to the tab panel ? can you give me a example

willigogs
10 Aug 2012, 11:49 AM
I'm not at my computer right now, but I can certainly provide an example of how to achieve this later (I'll try my best now on my phone).

In the meantime I'd recommend taking a quick look at the 3.4 API documentation under Tabpanel > methods > add.

Basically you could have your tab prebuilt as before, but instead of adding it to the Tabpanel items, instead do the following:

Tabpanel.add(your_tab_variable_name).show();

I'll provide a proper example next time I get to my computer :)

willigogs
13 Aug 2012, 1:03 AM
Here's the basic example I was looking for the other day:
http://dev.sencha.com/deploy/ext-3.4.0/examples/tabs/tabs-adv.html