harley.333
25 Jun 2009, 9:29 AM
I've recently started a new project using Ext 3.0. Is there anything new in regards to a FormPanel with columns?
I'm going to use code like this:
items: [
{
xtype: "panel",
layout: "column",
items: [
{
xtype: "panel",
columnWidth: .5,
layout: "form",
items: [
{
xtype: "textfield",
fieldLabel: "First Name"
}
]
},
{
xtype: "panel",
columnWidth: 5.,
layout: "form",
items: [
{
xtype: "textfield",
fieldLabel: "Last Name"
}
]
}
]
},
{
xtype: "panel",
layout: "column",
items: [
{
xtype: "panel",
columnWidth: .5,
layout: "form",
items: [
{
xtype: "textfield",
fieldLabel: "City"
}
]
},
{
xtype: "panel",
columnWidth: .2,
layout: "form",
items: [
{
xtype: "textfield",
fieldLabel: "State"
}
]
},
{
xtype: "panel",
columnWidth: .3,
layout: "form",
items: [
{
xtype: "textfield",
fieldLabel: "Zipcode"
}
]
}
]
}
]
Is this the best way?
I'm going to use code like this:
items: [
{
xtype: "panel",
layout: "column",
items: [
{
xtype: "panel",
columnWidth: .5,
layout: "form",
items: [
{
xtype: "textfield",
fieldLabel: "First Name"
}
]
},
{
xtype: "panel",
columnWidth: 5.,
layout: "form",
items: [
{
xtype: "textfield",
fieldLabel: "Last Name"
}
]
}
]
},
{
xtype: "panel",
layout: "column",
items: [
{
xtype: "panel",
columnWidth: .5,
layout: "form",
items: [
{
xtype: "textfield",
fieldLabel: "City"
}
]
},
{
xtype: "panel",
columnWidth: .2,
layout: "form",
items: [
{
xtype: "textfield",
fieldLabel: "State"
}
]
},
{
xtype: "panel",
columnWidth: .3,
layout: "form",
items: [
{
xtype: "textfield",
fieldLabel: "Zipcode"
}
]
}
]
}
]
Is this the best way?