ExtJS 3.4放射组拉伸关闭
我对设置收音机组中每个单选按钮的宽度有问题ExtJS 3.4放射组拉伸关闭,extjs,Extjs,我对设置收音机组中每个单选按钮的宽度有问题 xtype: 'container', id: 'cntCompany', layout: 'hbox', fieldLabel: 'Company', items: [ { xtype: 'radiogroup', id: 'rdogrpCompany', items: [ { id: 'rdoIT', boxLabel: 'IT', name: 'rdoCompany'
xtype: 'container',
id: 'cntCompany',
layout: 'hbox',
fieldLabel: 'Company',
items: [
{
xtype: 'radiogroup',
id: 'rdogrpCompany',
items: [
{ id: 'rdoIT', boxLabel: 'IT', name: 'rdoCompany', inputValue: 'IT', width: 40, checked: true },
{ id: 'rdoCOMMS', boxLabel: 'COMMS', name: 'rdoCompany', width: 40, inputValue: 'Comms' },
{ id: 'rdoGROUP', boxLabel: 'GROUP', name: 'rdoCompany', width: 40, inputValue: 'Group' },
{ id: 'rdoALL', boxLabel: 'ALL', name: 'rdoCompany', width: 40, inputValue: 'All', margins: '0 0 0 30' }
]
}
]
我设置了每个单选按钮的宽度,但它不能正常工作。
为什么此放射组显示为同一宽度列而忽略宽度:40?
如何设置每个单选按钮的宽度?默认情况下,组合组/单选组使用列布局来对齐分组的元素。如果没有其他设置,则使用“auto”作为默认值 控件将在一行上的每列呈现一个,并显示其宽度 每一列的宽度将根据墙的宽度均匀分布 整体字段容器。这是默认设置 基于API,这是一个布局问题。请注意,如果未定义布局,ExtJS将使用默认布局。因此,如果
列:1
解决您的问题,请更改布局或尝试
编辑:
根据评论,正确答案是
列:[40,40,40,40]
我认为这是由您选择的布局造成的。它似乎覆盖了子项的宽度。但这只是一个猜测…@sra我认为这不是一个布局问题,因为单选按钮宽度在没有单选组的情况下可以正常工作。谢谢@sra。我在Ext Designer中尝试了“columns:1”,但无法输入1。它看起来像一只虫子。当然,它在手动编辑后工作。对于其他人,我想为每个单选按钮指定每个宽度。列:1不是我想要的答案,因为它是垂直单选按钮数组。答案将是“列:[40,40,40,40]”。再次感谢你