PDA

View Full Version : Styling textarea



mixo
18 Feb 2013, 12:20 AM
Hello guys!

I want styling my textarea field in dynamic. I find that it can be done by use setFieldStyle method of Ext.form.Field class, which take a css style config as arguments.


field.setFieldStyle('background-color: #AEFDAC;');

But I want use a css classes for this and I have no idea how to solve this issue?

sword-it
18 Feb 2013, 8:23 AM
Hi Mixo,

You can use "fieldCls" config of textfield component.
for more info read API docs- http://docs.sencha.com/ext-js/4-1/#!/api/Ext.form.field.Text-cfg-fieldCls

mixo
18 Feb 2013, 6:05 PM
Thanks for answer sword!
"fieldCls" config applyed on init component, but I need to change field style on text input - change bg color for valid\invalid data. In this case I can't apply new field class by setting fieldCls.