Results 1 to 2 of 2

Thread: How customize the tabbutton's listener from the tabpanel?

  1. #1
    Touch Premium Member
    Join Date
    Aug 2011
    Posts
    59
    Vote Rating
    1
      0  

    Default 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,748
    Vote Rating
    128
      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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •