PDA

View Full Version : Hiding a tab



carlinniss
12 Jul 2011, 12:44 PM
I'm using the following code to create my tabs

var wrapper = new Ext.TabPanel({
fullscreen: true,
layout: 'fit',
id: 'mainwrapper',
tabBar: {
dock: 'bottom',
flex:0,
layout: {
pack: 'center'
},
height:'65px'
},
items: [
{
xtype: 'container',
layout: 'fit',
items: formBase,
title: 'Add Contacts',
iconMask: true,
iconCls: "favorites",
cls: 'card1'
},
{
xtype: 'container',
layout: 'fit',
id: 'detail',
items: detailPanel,
title: 'Detail Panel',
iconMask: true,
iconCls: "favorites"
},
{
layout: 'fit',
xtype: 'container',
items: productsList,
id:'productsList',
scroll: 'vertical',
title: 'My Contacts',
iconMask: true,
iconCls: "team",
cls:'card2',
listeners : {
activate : function() {
contactstore.clearFilter();
contactstore.sort('firstName','ASC');
}
}
},
{
items: activeList,
scroll: 'vertical',
id: 'requestsBtn',
title: 'My Requests',
iconMask: true,
iconCls: "time",
cls:'card3'

}]
});

I'd like the detail panel which I've named detail to not show in the tab bar. I tried just not adding it, but then it makes a phantom tab when I use setActiveItem to the panel. It basically just makes a tab where I can see it active with nothing there whenever I don't use this method. This method works great except for the fact that I can't make the Detail Panel tab invisible.

Any ideas?

Thank you for reading!