making gwtext's toolbarbutton ICON appear

15 views
Skip to first unread message

ytbryan

unread,
Feb 17, 2009, 3:32:10 AM2/17/09
to Google Web Toolkit
i have this toolbarbutton and its method setIconCls();


1. ToolbarButton button_daily_View = new ToolbarButton("Daily
View");
2. button_daily_View.setIconCls("database-add-icon");

ToolbarButton button_daily_View = new ToolbarButton("Daily View");
button_daily_View.setIconCls("database-add-icon");

at the css, i have this:


1. .database-add-icon{
2. background-image:url(images/database_add.png);
3.
4. }

.database-add-icon{ background-image:url(images/database_add.png); }


but the icon don't appear. I am not sure what went wrong. maybe it's
not the gwt fault but i cannot pin-point where is the error? can
someone advise me ? I attached a picture ( circled the point where
icon supposed to be) THANKS alot!!


picture here http://www.quickfilepost.com/download.do?get=ed4f75339f725d64633f905d

Mark RG Itol

unread,
Apr 2, 2009, 2:44:32 AM4/2/09
to Google Web Toolkit
Hi guys,

I'm also having the same problem. setIconCls() works on menu items,
though.
The style names I used on the invocations to setIconCls on both the
ToolbarButton and the Item (menu)
are contained in the same css file.
I hope you guys can shed light on this one.

Thanks in advance.

wouter

unread,
Apr 2, 2009, 3:12:47 AM4/2/09
to Google Web Toolkit
Stumbled on that too. Solved my problem using GWT PushButtons and
wrapping them in GXT AdapterToolItems.

Mark RG Itol

unread,
Apr 2, 2009, 6:13:09 AM4/2/09
to Google Web Toolkit
Hi wouter,
If you wouldn't mind, can you share to us the code on PushButton and
GXT AdapterToolItems?
Thanks a lot. :)

Mark
Reply all
Reply to author
Forward
0 new messages