PDA

View Full Version : Formatting a form



bbxx
8 Oct 2009, 4:11 PM
I'm having problems getting two form items in different columns to line up. What I want to do is pretty simple, but I'm not sure how.

http://teikena.com/temp/form_align.jpg


Current Code:

{
layout: 'column',
labelWidth: 1,
columnWidth:'300px',
defaults: {
border: false,
},
items: [{ layout: 'form',
items:[{xtype:'combo'}, {xtype:'combo'}, {xtype:'combo'}]
},{
layout: 'form',
items:[{xtype:'button', text:'ADD'}, {xtype:'button', text:'ADD'}, {xtype:'button', text:'ADD'}]
}]

}

jarlau
8 Oct 2009, 5:51 PM
I preferred something like:


{
layout: 'column',
labelWidth: 1,
columnWidth:'300px',
defaults: {
border: false,
},
items: [{ layout: 'column',
items:[{xtype:'combo', columnWidth: .9}, {xtype:'button', text:'ADD1', columnWidth: .1}, {xtype:'combo', columnWidth: .9}, {xtype:'button', text:'ADD2', columnWidth: .1}]
}]

}

Animal
8 Oct 2009, 9:30 PM
What about creating a button plugin for Ext.form.Field?