PDA

View Full Version : Icons



rupanpaul
21 Sep 2012, 10:57 PM
I have a tab panel and I want to add icons insde it but i am not able to display them!

Please suggest what should i do?

metalinspired
22 Sep 2012, 5:31 AM
Have you tried this (http://docs.sencha.com/ext-js/4-1/#!/api/Ext.button.Button-cfg-iconCls)?

rupanpaul
22 Sep 2012, 6:23 AM
iconcls : string

string should be the path of an image or what?

metalinspired
22 Sep 2012, 7:18 AM
It should be css class name.

You create something like this in your CSS file:


.some_class_name {
background: url('../path_to_image.png') no-repeat;
}


P.S. Icon image should be 16x16 pixels.

And then:


...
iconCls: 'some_class_name',
...

talha06
22 Sep 2012, 1:15 PM
iconcls : string

string should be the path of an image or what?
you can use both of them, if you want to use path, you should use icon config. Otherwise you should define iconCls inside css rules, then set it iconCls config.