PDA

View Full Version : problem with position textField from Form



chuvinha
20 Jan 2011, 5:45 AM
Hi guys, I am with a problem for position the textField on Form.
I am using include to add the textField.
So the textField doens't aligned with other fields.
The textField's fieldLabel doens't appears too.
The textField is left from Form.





Ext.onReady(function() {

var fieldCategoria = new Ext.form.TextField( {
fieldLabel : 'Categoria',
id: 'campoCategoria',
hideLabel: false,
renderTo : 'fieldCategoria',
name : 'categoria',
width: 478,
anchor : '100%'
});

});



Could someone help me?

valititi
20 Jan 2011, 5:48 AM
what layout do you use ? and can you show the code for your panel ? to see how the other fields are ok, and this one not.

Cindy Azcha
20 Jan 2011, 6:05 AM
in my case if I have multiple objects horizontally, use the compositefield, for example

{ xtype: 'compositefield', //para agrupar.
fieldLabel:'Plazo',
items:[
{xtype: 'textfield', width:90, name: 'plazo',id:'plazo', allowBlank: false, margins: '0 10 0 0'},
{xtype: 'displayfield', value: 'F.Inicio'},
{xtype: 'datefield', name: 'fechaInicio',id:'fechaInicio',format : 'd/m/Y',width:160,editable:false},
{xtype: 'displayfield', value:'F. Fin' },
{xtype: 'datefield', name:'fechaFin',id:'fechaFin',format : 'd/m/Y',width:160,editable:false}//,
],
},