PDA

View Full Version : center fieldset



osmancorp
4 Sep 2010, 9:58 AM
hello,


I would like like center this element fieldset in the middle of my formpanel.
for textfiel no worries but for fielset I block. and if anyone has a trick to define the width between two textfield?




my code :



this.Form = new Ext.FormPanel({

id: 'formpanel',
autoDestroy: true,
border : false,
closable:false,
labelWidth: 110,
defaults: {width: 330},
labelAlign: 'right',
bodyCfg: {tag:'center', cls:'x-panel-body'},
bodyStyle: 'padding:5p;margin:0px; ',
items: [{

xtype: 'textfield',
fieldLabel: 'Duration',
id: 'duree',
name: 'duree',
margins: '2 5 5 0',
vtype: 'numeric',
allowBlank: false
},{
xtype: 'textfield',
fieldLabel: 'Message Hobbit',
id: 'msg',
margins: '2 5 5 0',
name: 'msg',
allowBlank: false
},{
xtype :'fieldset',
title : 'Mettre seulement un test en Maintenance',
width : 400,
bodyCfg: {tag:'center', cls:'x-panel-body'},
bodyStyle: 'padding:5p;margin:0px; ',
margins: '2 5 5 0',
defaultType : 'textfield',
allowBlank: false,
items : [{
xtype: 'textfield',
fieldLabel: 'Nom du test',
id: 'nametest',
margins: '2 5 5 0',
name: 'test',
allowBlank: false
}]
}],
buttons: [{
text: 'Valider',
handler : function() {
hobbit.send(this);
}
},{
text: 'Annuler',
handler: function() {
ScreenGestion.AL.destroy();
}
}]
});


Thank you very much for your help

OsmanCorp

Animal
4 Sep 2010, 10:10 AM
Use hbox layout

osmancorp
4 Sep 2010, 10:17 AM
Thank You Animal ..

OsmanCorp