tabPanel Hide Tab

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();
posted on 2021-02-18 15:06  wakaka_wka  阅读(58)  评论(0编辑  收藏  举报