我是ext JS的新手,我试着在FormPanel中放置3个组件,但我不知道在中心对齐它们.
这是我的代码
var durationForm = new Ext.FormPanel({
border : false,
labelAlign : 'top',
frame : true,
bodyStyle : 'padding-left:475px;',
items: [{
items: [{
rowWidth : .5,
layout :'column',
items:[{
columnWidth : .13,
layout : 'form',
items : [getNewLabel('<br/><font size="3">Duration: </font>')]
},{
columnWidth : .20,
layout : 'form',
items : [fromDate()]
},{
columnWidth : .17,
layout : 'form',
items : [toDate()]
}]
}]
}]
});
durationForm.render(Ext.getBody());
Run Code Online (Sandbox Code Playgroud)
这显示了这样的输出

但我希望组件在面板的中心对齐.谁知道怎么做?