在Sencha中更改tabBar的加载选项卡

时间:2014-02-10 07:49:26

标签: extjs tabs sencha-touch loading tabbar

在这里,我想用'tab B'加载我的窗口而不重新排列标签的顺序。通常它会加载“标签A”。

请解决我的问题。

这是我的源代码:

Ext.define('test.view.tView', {

        extend: 'Ext.tab.Panel',
        xtype: 'main',
        requires: [
            'Ext.TitleBar'
        ],
        config: {

            tabBarPosition: 'bottom',

            items: [
                {
                    title: 'tab A',
                    styleHtmlContent: true,
                    scrollable: true,

                },
                {
                    title: 'tab B',
                    pressed : true,
                    items: [{

                            xtype : 'button',
                            ui : 'round',
                            text : 'my'
                        }]
                },

                {
                    title: 'tab C',

                },
                {
                    title: 'tab D',

                }
            ]
        },
    });

1 个答案:

答案 0 :(得分:0)

您可以尝试在标签面板中使用 activeItem 配置:

activeItem: 1,
tabBarPosition: 'bottom',