PDA

View Full Version : Tab Icon



JuanPalomo
28 Mar 2008, 5:37 PM
Hi,

Can anyone tell me how to include a tab icon?
(If this is already posted in the forum please show me where, I couldn't find it)

Thanks in advance,

xmwen
28 Mar 2008, 10:03 PM
----------------------------------
javascript:
----------------------------------
Ext.getCmp('ElementId').add(
{
id:'Your_Tab_Id',
title:'Your_Tab_Title',
iconCls: 'demoiconclass',
closable:true,
html:"Your content here!"
}
);

----------------------------------
css:
----------------------------------
.demoiconclass{background-image:url("../icons/demoicon.gif") !important;}

JuanPalomo
29 Mar 2008, 2:59 AM
Thanks xmwen! i will try it!

JuanPalomo
29 Mar 2008, 5:43 AM
Works perfect!! thanks again xmwen!!

Gunmen
5 Apr 2008, 1:42 PM
Is it also possible to change the space between the icon and the text? If yes, how can this be accomplished?

RWaters
7 Apr 2008, 6:18 AM
Not 100% Sure if it will work, but since you are passing in a class name I would expect that you could add some margin-right: to the class to get extra spacing between the icon and text.

Gunmen
7 Apr 2008, 7:39 AM
Not 100% Sure if it will work, but since you are passing in a class name I would expect that you could add some margin-right: to the class to get extra spacing between the icon and text.

Nope, this doesn't help.

Are there other options? I'm using the famfam icons and setting the icon as background.

Gunmen
12 Apr 2008, 2:33 AM
Any one else?

Some one knows what css class to manipulate? (I want a little bit more space between the icon and text)

TNX

jezmck
13 Apr 2008, 1:31 AM
I expect that inspecting the html using firebug will help identify the classes.

Gunmen
16 Apr 2008, 10:26 AM
I expect that inspecting the html using firebug will help identify the classes.

I don't have/use Firebug but IE. Some knows the css class? Thanks.

jezmck
16 Apr 2008, 11:52 PM
you're brave to admit that on these forums.
getfirebug.com (http://www.getfirebug.com)

Gunmen
18 Apr 2008, 7:20 AM
you're brave to admit that on these forums.
getfirebug.com (http://www.getfirebug.com)

Okay, thanks! Just did it.

jezmck
18 Apr 2008, 7:22 AM
Great. I'm sure you'll find it really useful.