1. #1
    Sencha User
    Join Date
    Sep 2012
    Posts
    151
    Vote Rating
    0
    Answers
    19
    coletek is on a distinguished road

      0  

    Default Answered: How do you include a sencha touch icon within itemTpl

    Answered: How do you include a sencha touch icon within itemTpl


    If I have a list with the following:

    Code:
    itemTpl: '{name} <tpl if="is_locked == 0">LOCKED</tpl>',
    Then how do I correctly replace the word LOCKED with the sencha touch icon "sdk/resources/themes/images/default/pictos/lock_closed.png"

    Best Regards,
    What comes around goes around

  2. If you use a DOM inspector to see how Sencha Touch does icons for buttons, you can easily replicate this with your own HTML and CSS.

    Code:
    itemTpl: new Ext.XTemplate(
            '<span class="{iconCls} x-list-icon x-icon-mask"></span>',
            '{title}'
          ),
    Works for me, not sure if I also have extra CSS or not...

  3. #2
    Sencha User
    Join Date
    Jan 2012
    Location
    London, UK
    Posts
    520
    Vote Rating
    83
    Answers
    25
    shepsii is just really nice shepsii is just really nice shepsii is just really nice shepsii is just really nice

      0  

    Default


    If you use a DOM inspector to see how Sencha Touch does icons for buttons, you can easily replicate this with your own HTML and CSS.

    Code:
    itemTpl: new Ext.XTemplate(
            '<span class="{iconCls} x-list-icon x-icon-mask"></span>',
            '{title}'
          ),
    Works for me, not sure if I also have extra CSS or not...

Thread Participants: 1