Results 1 to 3 of 3

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

  1. #1
    Sencha User
    Join Date
    Sep 2012
    Location
    India
    Posts
    19
    Vote Rating
    0
      0  

    Default 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
      0  

    Default Try This

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

    Hope it will Help ..

  3. #3
    Sencha User bricemason's Avatar
    Join Date
    Jan 2008
    Location
    Upstate NY
    Posts
    280
    Answers
    49
    Vote Rating
    46
      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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •