-
7 Feb 2008 9:23 AM #1
no icons from iconCls
no icons from iconCls
Hy,
i want to customize an example, but i loose the add/delete Buttons while doing this. I see the buttons and the text, but no images before the text.
in my header i added:Code:... // inline toolbars tbar:[{ text:'Add Something', tooltip:'Add a new row', iconCls:'add' }, '-', { text:'Options', tooltip:'Blah blah blah blaht', iconCls:'option' },'-',{ text:'Remove Something', tooltip:'Remove the selected item', iconCls:'remove' }], ...
where is the problem?HTML Code:<!-- adding the extjs library --> <script type="text/javascript" src="_lib/extjs/adapter/ext/ext-base.js"></script> <script type="text/javascript" src="_lib/extjs/ext-all.js"></script> <link rel="stylesheet" type="text/css" href="_lib/extjs/resources/css/ext-all.css" /> <!-- adding custom extjs scripts for this page --> <script type="text/javascript" src="modules/company/_js/index.js" ></script>
-
7 Feb 2008 9:50 AM #2
Look at the CSS in the example. The iconCls is just the name of a CSS class, which then gives an image to use. You are probably missing the appropriate CSS.
Which example are you using?
-
7 Feb 2008 9:59 AM #3
You must write your own css classes to add these icon classes. Don't forget to add an !important in the end of each class. I'm using the following code in my application:
Code:.home-icon { background-image: url(../images/icons/house.png) !important; } .form-title-icon { background-image: url(../images/icons/application_form.png) !important; } .add-icon { background-image: url(../images/icons/add.png) !important; }
-
7 Feb 2008 11:37 AM #4
i use this example:
extjs/examples/grid/grid3.html
(the last grid) from the extjs download package
i looked for a css definition for this images, but i can't find it...
but now i try again
-
7 Feb 2008 11:42 AM #5
i found it.
it was not in an external css file. it was in the header of the page.HTML Code:.add { background-image:url(../shared/icons/fam/add.gif) !important; } .option { background-image:url(../shared/icons/fam/plugin.gif) !important; } .remove { background-image:url(../shared/icons/fam/delete.gif) !important; }
thank you!


Reply With Quote
