我使用的EXT版本是3.2.1
在使用FormPanel排版的时候遇到了这样的问题
我用column作为layout
items里面的元素 按照百分比划分 每一行刚好到100% 为什么实际出来的效果要多于一行呢?
代码如下:
labelAlign: 'left',
title: '表单例子',
buttonAlign:'right',
bodyStyle:'padding:5px',
width: 600,
frame:true,
labelWidth:80,
items: [{
layout:'column',
border:false,
bodyStyle:'padding:0px',
labelSeparator:':',
items:[{
columnWidth:.5,
layout: 'form',
border:false,
items: [{
xtype:'textfield',
fieldLabel: '姓名',
name: 'name',
anchor:'90%'
}]
},{
columnWidth:.25,
layout: 'form',
border:false,
items: [{
style:'margin-top:5px',
xtype:'radio',
fieldLabel: '性别',
boxLabel:'男',
name: 'sex',
checked:true,
inputValue:'男',
anchor:'95%'
}]
},{
columnWidth:.25,
layout: 'form',
labelWidth:0,
labelSeparator:'',
hideLabels:true,
border:false,
items: [{
style:'margin-top:5px',
xtype:'radio',
fieldLabel: '',
boxLabel:'女',
name: 'sex',
inputValue:'女',
anchor:'95%'
}]
},{
columnWidth:.5,
layout: 'form',
border:false,
items: [{
xtype:'datefield',
fieldLabel: '出生日期',
name: 'birthday',
anchor:'90%'
}]
},
效果如图:
跟代码不是一个 但是问题是一样的。。。。
[img]http://dl.iteye.com/upload/attachment/274805/3e9389a6-007e-3437-ab5c-a8b82683cea5.png[/img]