-
FEATURED COMPONENTS
First time here? Check out the FAQ!
I have below code in .zul file
<image sclass="myimg" width="100px" height="80px" src="/img/rasp/File-icon128.png"
forward="onClick=onThumbnailClick(${each.id})" />
and the above image is in a Grid row. This works properly and when i click on the image it invokes the method onThumbnailClick() as well. The only issue is that, in the browser when i move the mouse over the image it does not change the mouse pointer to "palm" indicating that it a cliackable image. How do I visually indicate that its a clickable item? I have this issue in many images and not sure if its because of the event "forward"s.
thanks,
Shreesony
Does it work if you specify width and height for Toolbar button ?
Otherwise, we can go back to your image : by adding extra css properties : on hover : something
Refer this for adding extra css.
You can wrap your image inside an <a></a> element or use extra CSS like vinhvo suggested.
The CSS solution is to use cursor: pointer.
For example:
<image src="pic.png" style="cursor: pointer" />
Sometimes I prefer the <a></a> solution because you can then use :hover styles correctly.
(:hover CSS definitions work only on A tags in IE6).
For example if you'd like to add borders to your image on hover:
Doesn't work in IE6:
<style> .myimg:hover { border: 1px solid #777; } </style> <image sclass="myimg" src="pic.png" forward="..." />
Works in IE6:
<style> a.myimgwitha:hover { border: 1px solid #777; } </style> <a sclass="myimgwitha" forward="..."> <image sclass="myimg" src="pic.png" /> </a>
(Don't use <style></style> tags in real world code, use a separate CSS file instead)
Also, if you're using ZK 3.6, you'll have to use the HTML namespace for the A tag because there is no ZUL component called A.
Asked: 2010-05-31 15:18:39 +0800
Seen: 427 times
Last updated: Jun 01 '10