Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to hide tab in ExtJS 4

Tags:

extjs

extjs4

How to hide tab in ExtJS 4? Ext.getCmp("mytab").hide() doesn't work Can any one help me?

like image 256
cevek Avatar asked Nov 01 '11 20:11

cevek


1 Answers

Read the documentation here: http://docs.sencha.com/ext-js/4-0/#!/api/Ext.tab.Panel

They give a specific example of how to hide tabs

Extracted from link:

    var tabs = Ext.create('Ext.tab.Panel', {
    width: 400,
    height: 400,
    renderTo: document.body,
    items: [{
            title: 'Home',
            html: 'Home',
            itemId: 'home'
        }, {
            title: 'Users',
            html: 'Users',
            itemId: 'users',
            hidden: true
        }, {
            title: 'Tickets',
            html: 'Tickets',
            itemId: 'tickets'
        }]
 });
 setTimeout(function () {
    tabs.child('#home')
        .tab.hide();
    var users = tabs.child('#users');
    users.tab.show();
    tabs.setActiveTab(users);
 }, 1000);
like image 64
Sean Adkinson Avatar answered Sep 28 '22 07:09

Sean Adkinson