1. #1
    Sencha User
    Join Date
    Sep 2012
    Location
    India
    Posts
    19
    Vote Rating
    0
    Vishwastalule is on a distinguished road

      0  

    Default Unanswered: How To change background of select field in ST2?

    Unanswered: How To change background of select field in ST2?


    Hi,

    I want to change background of selectfield from white to other color.
    Also I want to change font color,size of options in selectfield.
    How do I change background, font of selectfield??

    Thanks,
    Vishwas

  2. #2
    Sencha User
    Join Date
    Nov 2012
    Posts
    5
    Vote Rating
    0
    BurhanB is on a distinguished road

      0  

    Default Try This

    Try This


    var d = document.getElementById( 'department' );
    d.style.background='red';

    Hope it will Help ..

  3. #3
    bricemason's Avatar
    Join Date
    Jan 2008
    Location
    Upstate NY
    Posts
    280
    Answers
    49
    Vote Rating
    44
    bricemason has a spectacular aura about bricemason has a spectacular aura about bricemason has a spectacular aura about

      1  

    Default


    You have a lot of tools at your disposal for this.

    Inline styles: http://docs.sencha.com/touch/2-1/#!/...lect-cfg-style

    Your own classes:
    http://docs.sencha.com/touch/2-1/#!/...ct-cfg-baseCls
    http://docs.sencha.com/touch/2-1/#!/...Select-cfg-cls

    Generalized theming using scss variables:
    http://docs.sencha.com/touch/2-1/#!/...ar-S-form-dark

    How you decide to approach this is dependent on a number of factors such as how much you intend on reusing these styles, etc.

    Try these out and if you have trouble targeting the style, just post the code you tried so we can help.

    Brice
    Brice Mason
    Front End Developer
    Modus Create

    @bricemason
    bricemason.com

    Sencha Touch Screencasts
    Vimeo - Sencha Touch Channel

    Github Projects:
    Sencha Cordova Builder enables the automatic creation, building, and running of PhoneGap (Cordova) projects with Sencha Touch.

    Am I Sencha Touch Ready? checks your system to determine what you need to do to start Sencha Touch development. If you're having trouble getting up and running, try this out.

    Sencha Tools Bridge allows Sencha SDK Tools to co-exist with Sencha Cmd on the same system.

Thread Participants: 2