Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

GWT Image button

Tags:

gwt

I am creating a Image button from PNG icons, I need to make a feel of button (but not push button effect) just a when user clicks the image a dotted square (like a selection) will appear so to have the effect that the button is clicked. Any ideas?

like image 674
quarks Avatar asked Jun 30 '11 20:06

quarks


1 Answers

Something like this in GWT:

Hyperlink link = new Hyperlink();
Image image = new Image(imageUrl);
...
link.getElement().appendChild(image.getElement());
link.setStyleName("imgBtnLink");

Add/set CSS style:

.imgBtnLink:active {
   border-style:dashed;
}

Old JSFiddle example: http://jsfiddle.net/Wsaf5/

like image 140
BumbleB2na Avatar answered Nov 15 '22 11:11

BumbleB2na