开发者

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'
    }
];
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜