For a widget-based solution, without rolling out something in-house, my
preferred approach is to use TextButton [1].
Note that there is not a direct method to setup the icon of the inner cell,
so you have to subclass TextButton and add a simple method like:
public void setIcon(ImageResource icon) {
((TextButtonCell) getCell()).setIcon(icon);
}
Such button extends CellWidget and is backed by a cell that supports the
Appearance pattern [2].
Also it support border collapse in order to make a button-bar-like set of
buttons, and also primary/negative styles to let a button stand out.
[1]
http://google-web-toolkit.googlecode.com/svn/javadoc/latest/com/google/gwt/widget/client/TextButton.html
[2] http://code.google.com/p/google-web-toolkit/wiki/CellBackedWIdgets
--
You received this message because you are subscribed to the Google Groups
"Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.