PDA

View Full Version : Simple question about TextArea auto-expanding



Topper
7 Sep 2007, 6:23 AM
Hello. I have a form with some textAreas. I noticed is that when I start editing the text in one textarea, it auto-expands or something to the right. How do I avoid this? I tried with grow:false but it is still happening. The code is:



var resumen_show = new Ext.form.TextArea({
fieldLabel: 'Resumen',
name: 'resumen',
allowBlank:false,
height:100,
blankText: 'Campo obligatorio',
width: "98",
grow: false
});


Thanks

Animal
8 Sep 2007, 12:20 AM
Did you look at the docs? There is no width or height config option. What units were you hoping to use anyway? Pixels? That would make it tiny. Percent?

Try specifying an autoCreate template with the styling you require:



var resumen_show = new Ext.form.TextArea({
autoCreate: {
tag: "textarea",
style:"width:98px;height:100px;",
autocomplete: "off"
},
fieldLabel: 'Resumen',
name: 'resumen',
allowBlank:false,
blankText: 'Campo obligatorio',
grow: false
});