lpastor
18 Aug 2009, 12:11 PM
Hello,
My combobox in in a form and I want to reduce his width to 50% or 200 pixel.
Actualy it is display to the full width and I can't reduce it.
I try with : anchor:'50%' and width:200
The other field reduce well.
initComponent : function() {
// build the form-fields. Always a good idea to defer form-building to a method so that this class can
// be over-ridden to provide different form-fields
this.items = this.buildForm();
// build form-buttons
this.buttons = this.buildUI();
// super
formlp.superclass.initComponent.call(this);
},
buildForm : function() { // ################## Champs du form #############################
return [
{fieldLabel: 'nom', name: 'nom_application', anchor:'50%', allowBlank: false},
new Ext.form.ComboBox({
fieldLabel: 'Statut',
hiddenName:'id_statut_application',
store: store_statut,
valueField:'id_statut',
displayField:'nom_statut',
typeAhead: false,
triggerAction: 'all',
emptyText:'Vide...',
selectOnFocus:true,
anchor:'50%'
//width:200
}),
{xtype:'htmleditor', id:'bio', name: 'info_application', fieldLabel:'Info',
height:200,
anchor:'100%'
}
];
},
My combobox in in a form and I want to reduce his width to 50% or 200 pixel.
Actualy it is display to the full width and I can't reduce it.
I try with : anchor:'50%' and width:200
The other field reduce well.
initComponent : function() {
// build the form-fields. Always a good idea to defer form-building to a method so that this class can
// be over-ridden to provide different form-fields
this.items = this.buildForm();
// build form-buttons
this.buttons = this.buildUI();
// super
formlp.superclass.initComponent.call(this);
},
buildForm : function() { // ################## Champs du form #############################
return [
{fieldLabel: 'nom', name: 'nom_application', anchor:'50%', allowBlank: false},
new Ext.form.ComboBox({
fieldLabel: 'Statut',
hiddenName:'id_statut_application',
store: store_statut,
valueField:'id_statut',
displayField:'nom_statut',
typeAhead: false,
triggerAction: 'all',
emptyText:'Vide...',
selectOnFocus:true,
anchor:'50%'
//width:200
}),
{xtype:'htmleditor', id:'bio', name: 'info_application', fieldLabel:'Info',
height:200,
anchor:'100%'
}
];
},