1. #1
    Sencha User
    Join Date
    Jun 2011
    Posts
    52
    Vote Rating
    0
    won.rhee is on a distinguished road

      0  

    Default Ext.getCmp('someid').setValue() : styling setValue parameter

    Ext.getCmp('someid').setValue() : styling setValue parameter


    [RESOLVED]

    Hello again,

    I'm using Ext.getCmp('textfieldid').setValue('Current Locaton'); to change textfield in form panel.
    I would like to simple style 'Current Location' with css markup.
    Ext.getCmp('neartextfield').setValue("<div style='color:blue;'>CurrentLocation</div>"); Obviously does not work.
    What could be a simple workaround?

  2. #2
    Sencha - Services Team AndreaCammarata's Avatar
    Join Date
    Jun 2009
    Posts
    1,394
    Vote Rating
    22
    AndreaCammarata has a spectacular aura about AndreaCammarata has a spectacular aura about

      0  

    Default


    You can apply a different css class to your textfield to make it appears with blue text color, by simply calling

    Code:
    myTextField.addCls('myBlueClass');
    where "myBlueClass" is your custom css class.
    Please also notice that is always better get a field by using the "getComponent()" function instead of using "getCmp()".

    For istance:

    Code:
    myForm.getComponent('myTextField');
    where "myTextField" is your textfield "itemId".
    Sencha Inc
    Andrea Cammarata, Solutions Engineer
    CEO at SIMACS

    @AndreaCammarata
    www.andreacammarata.com
    github: https://github.com/AndreaCammarata

    TUX components bundle for Sencha Touch 2.x.x
    http://www.tux-components.com/


  3. #3
    Sencha User
    Join Date
    Jun 2011
    Posts
    52
    Vote Rating
    0
    won.rhee is on a distinguished road

      0  

    Default


    thank you Andrea. it was very helpful.

Thread Participants: 1

Tags for this Thread

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi