WAbstractArea contextMenu
Added by Florian Ransmayr over 11 years ago
Hello everyone,
I have a WPaintedWidget in my application and use a WAbstractArea to react on mouse events. To be more precise I want to use a right click context menu. My problem is the the browser context menu is diesplayed all the time.
I used the following statement with success on some other items.
setAttributeValue("oncontextmenu","event.cancelBubble = true; event.returnValue = false; return false;");
The setAttributeValue method is not available for the WAbstractArea.
What would be the correct way of disabling the browser context menu for a WAbstractArea?
Thanks a lot
Florian
Replies (4)
RE: WAbstractArea contextMenu - Added by Koen Deforche over 11 years ago
Hey Florian,
The solution is for us to add this missing API call to WAbstractArea.
In the mean time, you should be able to suppress the contextmenu by adding this 'oncontextmenu' method to an ancestor (e.g. parent) of the image.
Regards,
koen
RE: WAbstractArea contextMenu - Added by Florian Ransmayr over 11 years ago
Hi Koen,
thank you for the fast response. Should I open a feature request for this item? I am wondering why I didn't thought about the "easy" solution to just add this "oncontextmenu" method to a parent... Thanks for that hint as well ;)
Best regards
Florian
RE: WAbstractArea contextMenu - Added by Koen Deforche over 11 years ago
Hey Florian,
Yes you can add it as a feature request since otherwise we'll forget about it!
You can simply refer to this forum thread for details.
Regards,
koen
RE: WAbstractArea contextMenu - Added by Florian Ransmayr over 11 years ago
Hi Koen,
I created the feature request.
http://redmine.webtoolkit.eu/issues/2320
Best regards
Florian