If your tab bar has an identifier and the components have an identifier or product identifier, you can do the following: Ext.getCmp ('TAB_PANEL_ID'). getComponent ('ITEM_ID'). tab.hide ()
For instance,
var tabPanel = Ext.create("Ext.tab.Panel", { id: 'TAB_PANEL_ID', renderTo: Ext.getBody(), items:[{ title: 'Tab 1', itemId: 'TAB_1', html: 'This is the first tab' },{ title: 'Tab 2', itemId: 'TAB_2', html: 'This is the second tab' },{ title: 'Tab 3', itemId: 'TAB_3', html: 'This is the third tab' }] }); // You may want to add following in function body or inside event handler. // Hide the second tab: Ext.getCmp('TAB_PANEL_ID').getComponent('TAB_2').tab.hide(); // Show the second tab: Ext.getCmp('TAB_PANEL_ID').getComponent('TAB_2').tab.show();
source share