1. #1
    Ext User
    Join Date
    Nov 2010
    Posts
    4
    Vote Rating
    0
    skywareyu79 is on a distinguished road

      0  

    Default How to change background-color of TextField ?

    How to change background-color of TextField ?


    1.addStyleDependentName
    2.addStyleName
    3.setInputStyleAttribute("background-color", "gray");
    4.setStyleAttribute("background-color", "gray");

    Tried these methods, will not work.
    Which method can be done with it, or no way?
    Please help, thank you...

  2. #2
    Sencha User
    Join Date
    Sep 2007
    Posts
    13,971
    Vote Rating
    132
    sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light

      0  

    Default


    setInputStyleAttribute("background-color", "gray");
    This will work. Take a look at it with firebug and you will see there there is also an image as background image which you will need to remove.

  3. #3
    Ext GWT Premium Member
    Join Date
    Apr 2008
    Location
    Canada
    Posts
    7
    Vote Rating
    0
    rdrever is on a distinguished road

      0  

    Default


    field.addStyleName("myField");

    .myField input {
    background: gray none;
    }

  4. #4
    Ext User
    Join Date
    Nov 2010
    Posts
    4
    Vote Rating
    0
    skywareyu79 is on a distinguished road

      0  

    Default


    Thank you, the problem has been resolved.

Similar Threads

  1. Cannot set textfield background color?
    By IvanJ in forum Ext 3.x: Help & Discussion
    Replies: 7
    Last Post: 11 Nov 2009, 2:55 PM
  2. How to make the Background color of textField and combo box?
    By smruti_patra in forum Ext 2.x: Help & Discussion
    Replies: 5
    Last Post: 26 Oct 2009, 6:40 AM
  3. Replies: 2
    Last Post: 12 Apr 2009, 5:52 PM
  4. Change row's text color (not background-color) in grid
    By khnle in forum Ext 1.x: Help & Discussion
    Replies: 1
    Last Post: 5 Feb 2008, 6:47 AM
  5. Change background-color
    By pongz79 in forum Ext 2.x: Help & Discussion
    Replies: 4
    Last Post: 29 Nov 2007, 10:49 AM

Thread Participants: 2