1. #1
    Sencha Premium Member Zdeno's Avatar
    Join Date
    Nov 2009
    Location
    Prague
    Posts
    397
    Answers
    7
    Vote Rating
    17
    Zdeno will become famous soon enough

      0  

    Default Unanswered: Ext.tab.Panel - Panel events

    Unanswered: Ext.tab.Panel - Panel events


    Do you plan or is there any way how to use standard events like show/active on tab which is added into tabpanel? Currently only added event is called on panel. Some assignments could be solved with events on Ext.tab.Panel however there are some cases when is better use listener on single card then on all cards.

  2. #2
    Sencha User
    Join Date
    May 2013
    Posts
    20
    Answers
    2
    Vote Rating
    4
    Orcyano is on a distinguished road

      0  

    Default


    You can listen on each child for its (de-)activation, here's some code sample:
    Code:
    
                Ext.create('Ext.tab.Panel', {
                        activeTab: 0,
                        items: [
                                {
                                    title: 'Your Tab Title',
                                    listeners: {
                                        activate: function() {
                                            // ... here goes your activation code
                                        },
                                        deactivate: function() {
                                            // ... here goes your deactivation code
                                        }
                                    }
                                }, // add more tabs afterwards
                          ]
                   });
    For a list on all events that you could listen to on an child, have a look at
    http://docs.sencha.com/extjs/4.2.0/#!/api/Ext.tab.Panel

    If you want to apply one function to all child elements though, i think you can use the defaults configuration, see here
    http://docs.sencha.com/extjs/4.2.0/#...l-cfg-defaults

    Hope i could help you

Thread Participants: 1