PDA

View Full Version : How customize the tabbutton's listener from the tabpanel?



0steve
2 Aug 2013, 3:39 PM
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):



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!

tobiu
6 Aug 2013, 8:27 AM
items: [
{
xtype: 'label',
html: 'Tab1',
listeners : {
// your event(s)
}
}


you could also use a controller and fetch the tab with a query.