列布局中,怎么去掉label名称与输入框之间的距离!

列布局中,怎么去掉label名称与输入框之间的距离!

items:[{
bodyStyle:'padding:10px;',
layout : 'column',
items : [{
columnWidth : .5,
layout : 'form',
border:false,
items :{
xtype : 'textfield',
fieldLabel : '栏目名称',
name : 'nodeName',
width:100
}},{

columnWidth : .5,
layout : 'form',
border:false,
items : {
xtype : 'textfield',
fieldLabel : '备选',
name : 'nodeBY',
width:100
}}]
}
]

为field设置合适的labelWidth属性即可。再说句题外话,此种方式进行布局代码丑陋、难以维护,如果使用Ext3.0后续版本最好采用hbox加Ext.ux.FieldLabeler插件(examples文件夹里有下载)我给你一个列子:
[code="js"]
var searchPanel = new Ext.FormPanel({

title: '矿山信息维护',
iconCls: 'pit',
frame: true,
region: 'north',
bodyStyle: 'padding:5px 0px',
height: 97,
labelWidth: 55,
layout: {
type: 'hbox',
pack: 'center'
},
defaults: {
xtype: 'textfield',

width: 240
},
items: [{
fieldLabel: '企业名称',
plugins: [Ext.ux.FieldLabeler],
name: 'name'
}, {
fieldLabel: '企业性质',
plugins: [Ext.ux.FieldLabeler],
xtype: 'combo',
mode: 'local',
store: natureStore,
displayField: 'name',
valueField: 'id',
forceSelection: true,
triggerAction: 'all',
name: 'nature'
}, {
fieldLabel: '法人代表',
plugins: [Ext.ux.FieldLabeler],
name: 'represent'
}, {
fieldLabel: '行政区划',
xtype: 'combo',
plugins: [Ext.ux.FieldLabeler],
name: 'region'
}],
buttonAlign: 'center',
buttons: [{
text: '查询',
iconCls: 'search'
}]
});
[/code]

去是去不掉的 你可以设置他们的大小去改变他们之间的距离

把宽度设小点就好了啊