Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/extjs/3.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字段容器拉伸_Extjs_Layout_Extjs6 Classic - Fatal编程技术网

ExtJs字段容器拉伸

ExtJs字段容器拉伸,extjs,layout,extjs6-classic,Extjs,Layout,Extjs6 Classic,我使用的是ExtJS6。 如何使字段容器的布局与表单布局完全相同 看我的小提琴: 我希望FieldContainer中的textfield的大小与第一个textfield的大小完全相同 也请不要让我把textfield放在我的FieldContainer中,但我希望对字段container中的每种类型的组件都有相同的想法 提前谢谢 更改表单面板的布局 Ext.application({ name : 'Fiddle', launch : function() {

我使用的是ExtJS6。 如何使
字段容器的布局与表单布局完全相同

看我的小提琴:

我希望
FieldContainer
中的
textfield
的大小与第一个
textfield
的大小完全相同

也请不要让我把
textfield
放在我的
FieldContainer
中,但我希望对
字段container中的每种类型的
组件
都有相同的想法


提前谢谢

更改表单面板的布局

Ext.application({
    name : 'Fiddle',

    launch : function() {
       Ext.create({
            xtype: 'panel',
            renderTo: Ext.getBody(),
            items: {
                padding: 5,
                xtype: 'form',
                layout: {
                            type:'vbox', 
                            align:'stretch'
                        },
                items: [
                    {
                        xtype: 'textfield',
                        fieldLabel: 'Name'
                    }, {
                        xtype: 'fieldcontainer',
                        fieldLabel: 'Test',
                        layout: 'form',
                        //layout: {
                        //    type:'vbox', 
                        //    align:'stretch'
                        //},
                        // combineLabels: true,
                        items: [
                            {
                                itemId: "in",
                                xtype: 'textfield'
                            }, {
                                itemId: "in2",
                                xtype: 'textfield'
                            }
                        ]
                    }, {
                        xtype: 'fieldcontainer',
                        fieldLabel: 'Test2',
                        layout: 'form',
                        //layout: {
                        //    type:'vbox', 
                        //    align:'stretch'
                        //},
                        // combineLabels: true,
                        items: [
                            {
                                xtype: 'component',
                                style: {
                                    border: '1px solid red'
                                },
                                html: 'something'
                            }
                        ]
                    }
                ]
            }
        })
    }
});

谢谢。我还将改变fieldContainer的布局,使其更加完美。