19/04/2009

SmartGWT Icon Names Convention

Posted in SmartGWT tagged , at 12:10 by vanje

The SmartGWT component ImgButton is ideal for icon-only buttons. With setSrc("Plus.png") you set the image file. SmartGWT then looks for the file "images/Plus.png" relative to the war root. The ImgButton component is also capable to display different icons based on the button state (like disabled, highlighted, …).

But I found no method to set the other icon files. I searched the SmartGWT and SmartClient APIs and the Forum. I found one post which mentioned a file name convention for icon files.  Luckily the GWT console logs all HTTP requests, so with that help it is easy to figure out the convention.

If the base icon file name is Plus.png then SmartGWT looks for Plus_Disabled.png for the disabled state icon and Plus_Over.png for the mouse over state in the same directory.

Advertisement

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.