1. #1
    Sencha User mixo's Avatar
    Join Date
    Jul 2011
    Location
    Novosibirsk
    Posts
    49
    Vote Rating
    3
    Answers
    4
    mixo is on a distinguished road

      0  

    Default Unanswered: Styling textarea

    Unanswered: Styling textarea


    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.

    Code:
    field.setFieldStyle('background-color: #AEFDAC;');
    But I want use a css classes for this and I have no idea how to solve this issue?

  2. #2
    Sencha - Community Support Team sword-it's Avatar
    Join Date
    May 2012
    Location
    Istanbul
    Posts
    1,333
    Vote Rating
    85
    Answers
    124
    sword-it is a jewel in the rough sword-it is a jewel in the rough sword-it is a jewel in the rough sword-it is a jewel in the rough

      0  

    Default use "fieldCls" config of the textfield

    use "fieldCls" config of the textfield


    Hi Mixo,

    You can use "fieldCls" config of textfield component.
    for more info read API docs- http://docs.sencha.com/ext-js/4-1/#!...t-cfg-fieldCls
    sword-it.com, Sencha Developer House in Turkey - Istanbul University Technopark Suite 204.

  3. #3
    Sencha User mixo's Avatar
    Join Date
    Jul 2011
    Location
    Novosibirsk
    Posts
    49
    Vote Rating
    3
    Answers
    4
    mixo is on a distinguished road

      0  

    Default


    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.

Thread Participants: 1