Search code examples
javascriptextjssencha-touch

Add custom image to items on Ext.tab.Panel


I want to add some customs images on the navigation items on Ext.tab.Panel.

I know, that there are a few images available if you use the iconCls.

items: [
    {
        title: 'Home',
        iconCls: 'home',
        html: 'Home Screen'
    },
    {
        title: 'Contact',
        iconCls: 'user',
        html: 'Contact Screen'
    }
]

How can I proceed? Is there a image property or something else, or do I have to write my own CSS classes?


Solution

  • css way, or use some of the icons included in the core, there a lot :)

    view:

    iconCls: 'myTab'
    

    css:

    .myTab {
       background-image: url("resources/images/myTab.png");
    }