Register the  events by calling the following method in the
constructor of your widget.
sinkEvents(Event.ONMOUSEDOWN | Event.ONMOUSEUP | Event.ONMOUSEOVER |
Event.ONMOUSEOUT);

// override in your widget class
public void onBrowserEvent(Event event)
{
  switch (DOM.eventGetType(event))
  {
    case Event.ONMOUSEDOWN:
    {
     // write your logic here.
     Window.alert(" ONMOUSEDOWN");
     break;
   }
   case Event.ONMOUSEUP:
   {
   Window.alert(" ONMOUSEUP");
   break;
   }
   case Event.ONMOUSEOVER:
   {
   Window.alert(" ONMOUSEOVER");
   break;
   }
   case Event.ONMOUSEOUT:
   {
   Window.alert(" ONMOUSEOUT");
   break;
   }
 }
}

S. Abraham
www.DataStoregwt.com

On Sep 5, 6:57 am, wahaha <[email protected]> wrote:
> when and in what situation would the onBrowserEvent method of Widget
> be triggered ?
>
> sorry for my poor english,i hope you can understand what i say.

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