yes one way is the one mentioned below. heres how i am doing it a particular
case.

public class UserListRow extends Composite implements
MouseOverHandler,MouseOutHandler {
public interface UserListRowBinder extends UiBinder<Widget, UserListRow>{
 }
 public UserListRow() {
initWidget(binder.createAndBindUi(this));
*addDomHandler(this, MouseOverEvent.getType());*
* **addDomHandler(this, MouseOutEvent.getType());*
}

}

Now any other widget can include this widget and add mouseout/over handlers
to it.

this is working on GWT 2.0.3 on IE6/FF3.5.x/Chrome. Didnt check for
safari/opera.

HTH

Thanks,
Subhro.


On Mon, Apr 12, 2010 at 9:14 PM, Trevor Skaife <[email protected]> wrote:

> Here is an example of a FlowPanel that I added some handlers to...
>
> public class FlowPanelMouse extends FlowPanel implements
> HasMouseOverHandlers, HasMouseOutHandlers, HasClickHandlers
> {
>
>    public HandlerRegistration addMouseOverHandler(MouseOverHandler
> handler)
>    {
>        return addDomHandler(handler, MouseOverEvent.getType());
>    }
>
>    public HandlerRegistration addMouseOutHandler(MouseOutHandler
> handler)
>    {
>        return addDomHandler(handler, MouseOutEvent.getType());
>    }
>
>    public HandlerRegistration addClickHandler(ClickHandler handler)
>    {
>        return addDomHandler(handler, ClickEvent.getType());
>    }
>
> }
>
> On Apr 12, 8:47 am, myapplicationquestions <[email protected]>
> wrote:
> > I also have the same issue where the mouseover is not getting
> > reisgtered in a div added via an HTML widget. I am trying to listen to
> > mouseover using the native preview handler.
> >
> > FYI: This works in GWT 1.7.1 but once i upgrade to GWT 2.0 it stops
> > working.. anyone has seen this happening?
> >
> > On Apr 11, 11:34 pm, Subhrajyoti Moitra <[email protected]>
> > wrote:
> >
> >
> >
> > > extends MouseOutHandler and MouseOverHandler in your widget.
> > > implement the necessary methods.
> >
> > > Subhro.
> >
> > > On Mon, Apr 12, 2010 at 8:53 AM, Chad <[email protected]> wrote:
> > > > I have a custom widget that extends SimplePanel. This widget consists
> > > > of a few extra DIV tags and for one I would like to receive the
> > > > onmouseover and onmouseout events. What is the proper method for
> > > > getting these events for a specific DOM element within a custom
> > > > Widget?
> >
> > > > Thanks,
> > > > -- Chad
> >
> > > > --
> > > > 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]<google-web-toolkit%[email protected]><google-web-toolkit%2Bunsubs
> ­[email protected]>
> > > > .
> > > > For more options, visit this group at
> > > >http://groups.google.com/group/google-web-toolkit?hl=en.-Hide quoted
> text -
> >
> > > - Show quoted text -
>
> --
> 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]<google-web-toolkit%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/google-web-toolkit?hl=en.
>
>

-- 
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.

Reply via email to