1. #1
    Sencha User
    Join Date
    Oct 2010
    Posts
    11
    Answers
    1
    Vote Rating
    0
    freightgate is on a distinguished road

      0  

    Default Answered: Add icon to textfield like useClearIcon

    Answered: Add icon to textfield like useClearIcon


    Can I add a button or icon to an inputfield to fire an Event ? Or can I override the useClearIcon function and change the icon ?

    I load a form to show some information and want to add for special textfields a more button. My textfield is read only.

    for example

    Code:
    { xtype: 'textfield',
      id: 'resultcard_textfield_etd_atd_dp',
      name : 'etd_atd_dp',
      label: 'ETD*-ATD',
      listeners: {
               afterrender: function(ele) {
                   ele.fieldEl.dom.readOnly = true;        
                   ele.labelEl.update('<span class="font_second_color">ETD*-</span><span class="font_first_color">ATD</span>');                        }
                        }
                    }
    Has some one a great solution for this ?

  2. It's all in the render tpl... look at the source for the text field

  3. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,327
    Answers
    3540
    Vote Rating
    849
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    It's all in the render tpl... look at the source for the text field
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  4. #3
    Sencha User
    Join Date
    Jul 2011
    Posts
    55
    Answers
    3
    Vote Rating
    1
    jvwelzen is on a distinguished road

      0  

    Default


    Hi

    is there an example how this can be done.

    I am able to overide the label but not the textfield or clearicon

    thx in advance

Thread Participants: 2