Wednesday, February 24, 2016

Re: mouse over

One quick and easy way of doing it is using GQuery (http://dev.arcbees.com/gquery/):

UiBinder file:

<div ui:field="divElement">Inside my div element</div>

Corresponding Java file:

@UiField
DivElement divElement;

...

GQuery.$(divElement).on(BrowserEvents.MOUSEOVER, new Function()
        {
            @Override
            public boolean f(Event e)
            {
                Window.alert("Hi there!!!"); // Do something more interesting
                return true;
            }
        });

I highly recommend using GQuery if you're not using it already on your GWT project.


On Wednesday, February 24, 2016 at 6:05:56 AM UTC-7, David wrote:
I have a regular html page. I can use GWT to get one element from that regular html page. I want to use GWT to generate a mouse over event on that element. How do I do it in GWT code?

Thanks,

David

--
You received this message because you are subscribed to the Google Groups "GWT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment