Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

GWT link button

Tags:

gwt

How to I make a hyperlink that functions as a button? Or how do I make a button that looks like a hyperlink?

like image 519
KevMo Avatar asked Jul 02 '09 20:07

KevMo


2 Answers

As of GWT 1.5, there is an Anchor widget that should do what you want.

like image 104
Kelly Norton Avatar answered Nov 13 '22 18:11

Kelly Norton


One easy way is to use the Label class. Just create a new label and add a ClickHandler to it. You can then style it however you want using CSS:

Label lbl = new Label("Hello");
lbl.addClickHandler(...);
lbl.setStyleName("hyperlink_style_label");
like image 13
rustyshelf Avatar answered Nov 13 '22 18:11

rustyshelf