Hi all, I must say that GWT is GREAT !!!
I need to change the icon of a PushButton depending on application
status, I managed to write this working code
public class IconButton extends PushButton
{
public IconButton(Image icon, ClickHandler listener)
{
super(icon,listener);
}
public void setIcon ( Image icon )
{
icon.removeFromParent();
Element element = getElement();
Node oldIcon = element.getFirstChild();
element.replaceChild(icon.getElement(),oldIcon);
}
}
but I am wondering if it is the correct solution
Anybody willing to comment on it ?
Thanks
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google Web Toolkit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---