Saturday, March 24, 2012

Re: change mouse cursor when hovering element

You have to use "cursor:pointer;" in your CSS.

"cursor:hand;" was Microsoft's way of implementing "cursor:pointer" in IE5.5 and earlier versions.

-- J.


Am Sonntag, 25. März 2012 00:03:25 UTC+1 schrieb Paul van Hoven:
I want to change the mouse cursor appearance when hovering a custom
widget on the webpage such that the underlying widget appears to the
user as a link. The widget looks like this

public class GalleryFrame extends AbsolutePanel implements
HasMouseDownHandlers {

        public GalleryFrame( String imagePath ) {
                this.​setStylePrimaryName("​GalleryFrame");
                ...

The css style "GalleryFrame" looks like this

.GalleryFrame { width:170px;height:108px;​cursor:hand; }

So, as you might guess right I want to make the whole GalleryFrame
widget clickable. Therefore, I implement the MouseDownHandler. Okay
but when hovering with the mouse over the widget nothing changes, the
cursor remains normal.

I googled around and I only find sources where they say you should add
cursor:hand to you css, as I do now in my case. But that does not
work.

What am I doing wrong here?

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/gedC6GvGcj0J.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate