Ext.TabPanel items handler
Is there any possibility to get an event when you click on the tab?
var bu开发者_JS百科ttons = [
{
title: 'Home',
iconCls: 'home'
}, {
title: 'Search',
iconCls: 'search'
}
];
var panel = new Ext.TabPanel({
fullscreen: true,
cls: 'panel',
ui: 'dark',
tabBar: {
dock: 'bottom',
layout: {
pack: 'center'
},
},
items:buttons
});
PS Google Translte, sorry.
Each items in buttons array are Tabs which is a Button successor so has "handler" property:
var buttons = [
{
title: 'Home',
iconCls: 'home',
handler: function(button, event) {
alert("Button " + button.getText() + " clicked!");
}
}, {
title: 'Search',
iconCls: 'search'
}
];
精彩评论