EXTJS 4.2 FieldContainer VBoxレイアウト
質問
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
}
]
. 所属していません StackOverflow