开发者

Sencha Touch tabPanel tabbar dynamic images

In my application i am having a tabPanel. The title and icons of the tabs need to be dynamic. I am getting this data from the server. But i couldn't find any way which can load icons from a external source URL. I used the iconCls property with my custom clas开发者_JAVA百科s as .tab{-webkit-mask-box-image: url("SomeHttpURL")} but this is also static. How do i make SomeHttpURL a placeholder which replaces with the URL i am getting from server at the runtime?

Tarun Sharma.


In your css:

.x-tab img.your_icon_name .x-button img.x-icon-mask.your_icon_name{
    -webkit-mask-image:url("SomeHttpURL");
}

In your panel code:

iconCls: 'your_icon_name',

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜