2012-06-02 70 views
0

我自学extjs,我正在使用制表符。我不知道如何调整整个容器的大小,不只是标签,但每个标签的数据将显示在哪里...我试过宽度:400但没有改变extjs:标签容器宽度

这是我的代码到目前为止:

Ext.application({ 
    name: 'HelloExt', 
    launch: function() { 

    Ext.require('Ext.container.Viewport'); 

    Ext.create('Ext.container.Viewport', { 
     layout: 'fit', 
     items: [{ 

      xtype: 'tabpanel', 
      width: 400, 
      activeTab: 0, // index or id 
      items:[{ 
       title: 'Tab 1', 
       html: 'This is tab 1 content.' 
      },{ 
       title: 'Tab 2', 
       html: 'This is tab 2 content.' 
      },{ 
       title: 'Tab 3', 
       html: 'This is tab 3 content.' 
      }] 

     }]//end of viewport 
    }); 
} 
}); 

有人可以给我这个片段吗?谢谢。

+0

您使用的是哪个版本? – sha

回答

1

您使用layout:'fit',因此tabpanel无法获得宽度属性尝试布局:'form'