Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/svg/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
extjs:tab容器宽度_Extjs_Tabs - Fatal编程技术网

extjs:tab容器宽度

extjs:tab容器宽度,extjs,tabs,Extjs,Tabs,我在自学extjs,我在使用标签。我不知道如何调整整个容器的大小,不只是调整选项卡的大小,而是每个选项卡的数据将显示在哪里……我尝试了宽度:400,但没有改变 以下是我目前的代码: Ext.application({ name: 'HelloExt', launch: function() { Ext.require('Ext.container.Viewport'); Ext.create('Ext.container.Viewport', {

我在自学extjs,我在使用标签。我不知道如何调整整个容器的大小,不只是调整选项卡的大小,而是每个选项卡的数据将显示在哪里……我尝试了宽度:400,但没有改变

以下是我目前的代码:

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
    });
}
});

有人能给我一个片段吗?谢谢。

您使用布局:“适合”,因此tabpanel无法获取宽度属性。请尝试布局:“表单”