I need to implement widget that I can right click to disable it and right
click to enable it again.
My code is like this:
widget.sinkEvents(Event.ONCONTEXTMENU);
widget.addHandler(new ContextMenuHandler() {
@Override
public void onContextMenu(ContextMenuEvent event)
{
event.preventDefault();
event.stopPropagation();
if (widget.isEnabled()) widget.setEnabled(false);
else widget.setEnabled(true);
}
}, ContextMenuEvent.getType());
This works when the widget is enabled. Meaning I can right click to disable
this widget.
However, when the widget is disabled, it does not trigger the right click
event.
Is there a way to make my custom right click working on a disabled widget?
Thanks,
Larry
--
You received this message because you are subscribed to the Google Groups
"Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.