質問

layout: {type:'vbox'}を持つFieldContainerを持つ形式を持っています。

同じ行に2つのフィールドを配置する必要がありますが、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 Fiddleです: https://fiddle.sencha.com/jp

役に立ちましたか?

解決

あなたの列またはラジオグループ全体の幅を指定する必要があります。

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

フィドルをチェックしてください: https://fiddle.sencha.com/jp/japture/8cj

他のヒント

解決済み:

解決策は、固定幅またはFLEXを各無線項目に割り当てることでした。

これはFIDDLE: https://fiddle.sencha.com/#fiddle/8ci

items: [{
        boxLabel: 'Official',
        width: 80,
        padding: '0 0 0 22',
        name: 'Request1',
        inputValue: 0,
        checked: true
    }, {
        boxLabel: 'Personal',
        flex: 1,
        name: 'Request1',
        inputValue: 1
    }

]
.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top