有时一个FormPanel 放很多输入框会变的很长,这时候需要分成两列比较美观,下面就是代码了
//add buyer form panel.
var formPanel = new Ext.FormPanel({
frame: true,
labelAlign: 'right',
labelWidth: 85,
width:450,
waitMsgTarget: true,
items: [
{layout:'column',width:450,items:[
{layout:'form',columnWidth:.50,items:[
buyerId,
buyerName,
buyerAgent,
buyerCommission,
buyerBank,
buyerAccount,
buyerPostcode
]},
{layout:'form',columnWidth:.50,items:[
buyerTaxnum,
buyerTele,
buyerEmail,
buyerAddr,
buyerFlag,
buyerSpell
]}
]}
]
});
var formPanel = new Ext.FormPanel({
frame: true,
labelAlign: 'right',
labelWidth: 85,
width:450,
waitMsgTarget: true,
items: [
{layout:'column',width:450,items:[
{layout:'form',columnWidth:.50,items:[
buyerId,
buyerName,
buyerAgent,
buyerCommission,
buyerBank,
buyerAccount,
buyerPostcode
]},
{layout:'form',columnWidth:.50,items:[
buyerTaxnum,
buyerTele,
buyerEmail,
buyerAddr,
buyerFlag,
buyerSpell
]}
]}
]
});