PDA

View Full Version : REPOST: iconCls problem



harsha_velicheti
7 Oct 2009, 11:29 PM
hi,
Please excuse me for reposting this, but i could not resolve this and i am struck up here now.

I am using iconCls to set the icon for buttons in top toolbar of grid, but they are not being displayed.

Below are my code snippents:
First, east region of my viewport



{
region : 'east',
title : 'test',
iconCls:'x-grid-add',
width: 400,
items: [admin_grid]
},

NOTE: i am adding an iconCls here, which is being displayed, and i am adding the same iconCls to a button in the admin_grid as follow



var activate_user = new Ext.Toolbar.Button({
id: 'activate_user',
text: 'Activate User',
tooltip: 'Activate an employee as an admin ...',
iconCls: 'x-grid-add',
disabled: true,
handler: function() {

//some funciton
}
});


and then i am adding it to the tbar of grid



var admin_grid = new Ext.grid.GridPanel({
tbar: [
activate_user
]


Can any one please help me out why the icon is not being displayed in the grid when it is being diplayed in the viewport region.

Thanks in advance
Harsha

Animal
8 Oct 2009, 12:02 AM
Why d'you overnest?

harsha_velicheti
8 Oct 2009, 12:23 AM
Why d'you overnest?
Hi,
If you mean why grid in an east region of view port and why not directy, coz i have other items as well to be placed in the east region.
Please let me know if i miss any thing.

TIA
Harsha

Animal
8 Oct 2009, 12:44 AM
So, how are you hoping that the contained GridPanel gets sized?

Anyway, iconCls. What are you hoping it will do? It has nothing whatsoever to do with any buttons. Read the API docs for it.