PDA

View Full Version : Few fields on same line



wehtam
19 Mar 2010, 11:13 AM
Hello,

I don't know how I can put few fields on the same line (like my attach file).

My code :

{
xtype:'fieldset',
title: 'Informations bancaires',
collapsible: false,
collapsed: false,
autoHeight:true,
defaultType: 'textfield',
items :[ {
fieldLabel: 'Banque',
name: 'Banque',
width : 625
},{
fieldLabel: 'Iban',
name: 'Iban',
width : 625
},{
fieldLabel: 'Iban 2',
name: 'Iban2',
width : 625
},{
fieldLabel: 'Swift',
name: 'Swift',
width : 625
} , ?????? ]}

Thank
ps : sorry for my very bad english

tubamanu
19 Mar 2010, 11:26 AM
u can add a panel to your fieldset with layout: 'column' and add your textfields to that panel.

e.g.



xtype: 'panel',
fieldLabel: 'Swift 2',
border: false,
layout: 'column',
items:[{
xtype: 'textfield',
style: 'margin-right:5px;',
allowBlank: true,
width: 45
},{
xtype: 'textfield',
allowBlank: true,
}

apurav
19 Mar 2010, 11:28 AM
You can use two ways to accomplish that, either put the four text fields in a panel with table layout or use absolute position on each of the four text fields

httpdotcom
19 Mar 2010, 12:22 PM
Or...you can switch to 3.2-beta and use the CompositeField xtype.
http://www.extjs.com/deploy/ext-3.2-beta/examples/form/composite-field.html