Results 1 to 7 of 7

Thread: add icon before textfield

  1. #1
    Sencha User
    Join Date
    Aug 2011
    Posts
    35

    Default add icon before textfield

    How can i add a icon before a textfield.

    See example:
    Attached Images Attached Images

  2. #2
    Sencha User jay@moduscreate.com's Avatar
    Join Date
    Mar 2007
    Location
    DC Area =)
    Posts
    16,364

    Default

    A quick way could be set an image tag as the "fieldLabel", and don't set a separator.

  3. #3
    Sencha User
    Join Date
    Aug 2011
    Posts
    35

    Default

    I want a fieldLabel and a seperator before the icon

    Thanks for the answer

  4. #4
    Sencha User jay@moduscreate.com's Avatar
    Join Date
    Mar 2007
    Location
    DC Area =)
    Posts
    16,364

    Default

    OK. then add an img tag before the text. Ideally, you don't want to add a separate component and deal with layouts, etc, if you don't need to.

  5. #5
    Sencha User
    Join Date
    Jul 2009
    Location
    The Netherlands
    Posts
    196

    Default

    I would like to know this as well...

    @[email protected]: how can i add the img tag before the textfield input? (So between the label and the input field). I've done something before with the 'autoEl' config, i guess this is it what you are referring to?

    Still it would be nice to create an extension for it, the only thing i don't know, is when i extend the TextField component, how i can access the html code.

  6. #6
    Sencha User
    Join Date
    Aug 2011
    Posts
    35

    Default

    bump

  7. #7

    Default

    Any nice and clean way of adding icon instead of label (or both icon and label)?

Posting Permissions

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