Hybrid View

  1. #1
    Ext User
    Join Date
    Feb 2008
    Posts
    7
    Vote Rating
    0
    magic8262 is on a distinguished road

      0  

    Default about collapse TabPanel

    about collapse TabPanel


    as below,I set "collapsible:true, titleCollapse:true".
    when I cilick on tabs,the panel will collapse too,I want to collapse panel only when I click title of tabpanel,how to config?thanks

    var tabs = new Ext.TabPanel({
    collapsible:true,
    titleCollapse:true,
    renderTo:'tabs',
    resizeTabs:true, // turn on tab resizing
    minTabWidth: 115,
    tabWidth:135,
    enableTabScroll:true,
    autoWidth:true,
    height:250,
    defaults: {autoScroll:true},
    activeTab: 0,
    items: [{
    title: 'Tab 1',
    html: 'A simple tab'
    },{
    title: 'Tab 2',
    html: 'Another one'
    }]

    });

  2. #2
    Sencha - Training Team RWaters's Avatar
    Join Date
    Mar 2007
    Location
    Los Angeles, CA
    Posts
    714
    Vote Rating
    0
    RWaters is on a distinguished road

      0  

    Default


    Take a look at the 'activate' event on the panel. You should be able to listen for this event then call the 'collapse' function on the panel.

  3. #3
    Ext User
    Join Date
    Feb 2008
    Posts
    7
    Vote Rating
    0
    magic8262 is on a distinguished road

      0  

    Default


    Thanks a lot!

  4. #4
    Sencha User phitien's Avatar
    Join Date
    Oct 2011
    Location
    Singapore
    Posts
    1
    Vote Rating
    0
    phitien is on a distinguished road

      0  

    Default


    just have the same problem, and below is my solution

    Code:
    xtype: 'tabpanel',
    titleCollapse: true,
    animate: true,
    items: [{
        title: 'tab1',
        xtype: 'panel'
    }, {
        title: 'tab2',
        xtype: 'panel'
    }],
    listeners: {
        afterrender: function() {
            var me = this;
            me.mun(me.header, 'click', me.toggleCollapse, me);
            me.mon(me.header, 'click', function(e, el, opt) {
                if(Ext.get(el).hasClass('x-tab-strip'))
                    me.toggleCollapse(me.animate);
            }, me);
        }
    }
    Phi Tien

Thread Participants: 2

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi