2014-02-10 40 views
1

在这里我想用'选项卡B'加载我的窗口而不重新排列选项卡的顺序。通常情况下,它会加载'选项卡A'。在Sencha中更改tabBar的加载选项卡

请解决我的问题。

这里是我的源代码:

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', 

       } 
      ] 
     }, 
    }); 

回答

0

你可以尝试使用activeItem配置为您的标签面板:

activeItem: 1, 
tabBarPosition: 'bottom', 
+0

是的,它的工作。谢谢 –

相关问题