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 4.2 fieldcontainer vbox布局_Extjs_Extjs4_Extjs4.1_Extjs4.2_Extjs Mvc - Fatal编程技术网

ExtJS 4.2 fieldcontainer vbox布局

ExtJS 4.2 fieldcontainer vbox布局,extjs,extjs4,extjs4.1,extjs4.2,extjs-mvc,Extjs,Extjs4,Extjs4.1,Extjs4.2,Extjs Mvc,我有一个表单,它有一个带有布局:{type:'vbox'}的fieldcontainer 我需要在同一行中放置两个字段,但是radiogroup未正确对齐。(为了更好地理解,我附上了图片) 表格代码如下所示: { xtype: 'datefield', fieldLabel: 'Date', format: 'd/m/Y', submitFormat: 'Y-m-d H:i:s', allowBlank: false, disabled: tru

我有一个表单,它有一个带有
布局:{type:'vbox'}
的fieldcontainer

我需要在同一行中放置两个字段,但是
radiogroup
未正确对齐。(为了更好地理解,我附上了图片)

表格代码如下所示:

{
    xtype: 'datefield',
    fieldLabel: 'Date',
    format: 'd/m/Y',
    submitFormat: 'Y-m-d H:i:s',
    allowBlank: false,
    disabled: true,
    value: new Date()
}, {
    xtype: 'fieldcontainer',
    fieldLabel: 'Type',
    combineErrors: true,
    defaults: {
        hideLabel: true
    },
    layout: {
        type: 'vbox'
    },
    items: [{
        xtype: 'combobox',
        width: 90,
        store: Ext.create('HolidayType', {
            autoLoad: true
        }),
        displayField: 'Description',
        valueField: 'HolidayTypeId',
        queryMode: 'local',
        allowBlank: false,

    }, {
        xtype: 'radiogroup',
        columns: 2,
        items: [{
                boxLabel: 'Official',
                name: 'RequestInAdvance',
                inputValue: 0,
                checked: true
            }, {
                boxLabel: 'Personal',
                name: 'RequestInAdvance',
                inputValue: 1
            }

        ]
    }]

}, {
    xtype: 'radiogroup',
    fieldLabel: 'Request',
    anchor: '70%',
    columns: 2,
    items: [{
            boxLabel: 'Payable',
            name: 'Request',
            inputValue: 0,
            checked: true
        }, {
            boxLabel: 'Non Payable',
            name: 'Request',
            inputValue: 1
        }

    ]
},
关于我如何获得欲望行为的线索

更新


这是sencha小提琴:

您需要为您的栏目或整个广播组指定宽度:

xtype: 'radiogroup',
width: 200,
columns: 2,
items: [
    { boxLabel: 'Official', name: 'Request1', inputValue: 0, checked: true },
    { boxLabel: 'Personal', name: 'Request1', inputValue: 1 }
]
查看小提琴:

已解决:

解决方案是为每个无线电项目分配一个固定宽度或弹性:

这是小提琴:


它不起作用了。。。我只是用Sencha小提琴更新我的帖子。
items: [{
        boxLabel: 'Official',
        width: 80,
        padding: '0 0 0 22',
        name: 'Request1',
        inputValue: 0,
        checked: true
    }, {
        boxLabel: 'Personal',
        flex: 1,
        name: 'Request1',
        inputValue: 1
    }

]