Hybrid View

  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

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar