On 5 mai, 00:04, Chad <[email protected]> wrote:
> Hi all,
>
> I need to fire a MouseOutEvent on a PushButton and can't figure out
> the right way to do it. I have a couple different scenarios where I
> need this. One is when I click the button, it gets hidden (while the
> mouse is still over it). Then, when it is shown again, it has the
> appearance of the mouse hover until I move the mouse over it and off
> of it. Another scenario is when the button is clicked, a modal popup
> is shown so the button doesn't receive the MouseOutEvent as the mouse
> moves off the button. I'm using these buttons as toolbar buttons and I
> would like to fire a MouseOutEvent in the ClickHandler.
Have a look at com.google.gwt.dom.client.Document::createMouseOutEvent
and com.google.gwt.event.dom.client.DomEvent::fireNativeEvent
(note that this is document in MouseOutEvent's constructor's JavaDoc)
Or you could use JSNI to call CustomButton::setDown with a 'false'
argument.
Or eventually subclass PushButton to make setDown public.
> Am I going
> about this all wrong? What's the best way to accomplish what I want
> (have the button appear that the mouse moved out of it)?
Check if there's an issue already open, and eventually file one ;-)
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google Web Toolkit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---