1. #1
    Touch Premium Member
    Join Date
    Aug 2011
    Posts
    59
    Vote Rating
    0
    0steve is on a distinguished road

      0  

    Default How customize the tabbutton's listener from the tabpanel?

    How customize the tabbutton's listener from the tabpanel?


    Hi,

    I would like to customize of the tabpanel button's listener from the tabpanel. The reason for this is I would like to make an overlay when one of the tabpanel button is pressed, and NOT an overlay within the tabpanel.

    Here's the tabpanel code (I am using Sencha Touch 2.01 and Architect 2.2.2):

    Code:
    Ext.define('MyApp.view.MyTabPanel', {
        extend: 'Ext.tab.Panel',
    
    
        config: {
            items: [
                {
                    xtype: 'container',
                    title: 'Tab 1',
                    iconCls: 'info',
                    items: [
                        {
                            //I would like to know how can I customize the Tab1's listener?
                            xtype: 'container',
                            items: [
                                {
                                    xtype: 'label',
                                    html: 'Tab1'
                                }
                            ]
                        }
                    ]
                },
                {
                    xtype: 'container',
                    title: 'Tab 2',
                    iconCls: 'info',
                    items: [
                        {
                            xtype: 'container',
                            items: [
                                {
                                    xtype: 'label',
                                    html: 'tab2'
                                }
                            ]
                        }
                    ]
                },
                {
                    xtype: 'container',
                    title: 'Tab 3',
                    iconCls: 'info',
                    items: [
                        {
                            xtype: 'container',
                            items: [
                                {
                                    xtype: 'label',
                                    html: 'tab3'
                                }
                            ]
                        }
                    ]
                }
            ],
            tabBar: {
                docked: 'bottom'
            }
        }
    
    
    });
    Thank You in Advance!

  2. #2
    Sencha User tobiu's Avatar
    Join Date
    May 2007
    Location
    Munich (Germany)
    Posts
    2,680
    Vote Rating
    112
    tobiu is a name known to all tobiu is a name known to all tobiu is a name known to all tobiu is a name known to all tobiu is a name known to all tobiu is a name known to all

      0  

    Default


    Code:
    items: [
        {
            xtype: 'label',
            html: 'Tab1',
            listeners : {
                // your event(s)
            }
        }
    you could also use a controller and fetch the tab with a query.
    Best regards
    Tobias Uhlig
    __________

    S-CIRCLES Social Network Engine

Thread Participants: 1