-
27 Nov 2008 3:09 AM #1
[SOLVED] Add an icon for title of ext.Window
[SOLVED] Add an icon for title of ext.Window
Hello ,
I woul like to know if it's possible to insert an icon in the title of a window.
I think i do not use the good css.PHP Code:win = new Ext.Window({
title : 'Lanceur',
closable : true,
width : 850,
height : 600,
//border : false,
plain : true,
layout : 'border',
icon: 'icons/telephone.png',
cls:'x-btn-left',
Or not the best way.
Thanks !Last edited by stevanovich; 27 Nov 2008 at 5:17 AM. Reason: [SOLVED]
-
27 Nov 2008 3:11 AM #2
-
27 Nov 2008 3:32 AM #3
Strange !
Strange !
Thanks Animal for quick reply !!!

I already use this for tabs, sorry for disturbing !!!
But , i'm still confusing about using iconCls, I mut setting them in html, otherwise it's nos possible to define in js.
in js
In htmlPHP Code:win = new Ext.Window({
title : 'Lanceur GlooMan',
closable : true,
width : 850,
height : 600,
//border : false,
plain : true,
layout : 'border',
//iconCls : 'Arbre_Bannis', // work by html setting
iconCls : '.Arbre_Bannis {background-image:url(icons/report_delete.png);}', // not Work
I miss something ???PHP Code:<style type="text/css">
html, body {
font:normal 12px verdana;
margin:0;
padding:0;
border:0 none;
overflow:hidden;
height:100%;
}
p {
margin:5px;
}
....
.Arbre_Bannis {
background-image:url(icons/report_delete.png);
}
...
</style>
(change path to ../ to ../../ etc, still not working)
-
27 Nov 2008 3:57 AM #4
You ned to learn HTML before you begin buildnig RIA apps!
A class is a class name. A DOM Element has a string which can contain class names.
You then specify styling rules which use selectors which are based on class names to apply the rules to elements.Search the forum: http://www.google.com/coop/cse?cx=01...%3Az7of1ufqccu
Read the docs too: http://extjs.com/deploy/dev/docs/
Scope: http://extjs.com/forum/showthread.ph...642#post257642
-
27 Nov 2008 5:08 AM #5
Wow, direct reply !
Wow, direct reply !
Thanks !

I confirm : i'm not an html expert ! (and not an Extjs expert !)
Maybe my question was stupid ?
I just folow the link you put on your post, and i read it:
So, am I stupid to think that extjs was able to setting new css ???iconCls : String A CSS class that will provide a background image to be used as the header icon (defaults to ''). An example custom ic...
A CSS class that will provide a background image to be used as the header icon (defaults to ''). An example custom icon class would be something like: .my-icon { background: url(../images/my-icon.gif) 0 6px no-repeat !important;}
I should use ext.util.css ?
I'm agree with you !A class is a class name. A DOM Element has a string which can contain class names.
You then specify styling rules which use selectors which are based on class names to apply the rules to elements.
Thanks for reply.
-
27 Nov 2008 1:26 PM #6
your iconCls whould be 'Arbre_Bannis', the name of the Class if I'm not wrong.
Nevermind, missread, you already tried that !! My bad.
-
27 Nov 2008 2:36 PM #7
Yes, as i explain in my example , after animal explanation, iconCls works fine with 'Arbre_Bannis'.
My read of API documentation was wrong: example given for ".my-icon { background: url(../images/my-icon.gif) 0 6px no-repeat !important;}" is only for css setting, in html or other.


Reply With Quote