Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse 4 » Popup menu for canvas
Popup menu for canvas [message #1016099] Mon, 04 March 2013 21:53 Go to next message
Li Chen is currently offline Li Chen
Messages: 20
Registered: July 2011
Location: Sydney
Junior Member
I am trying to add context menu for a canvas. The canvas itself has mouse listener that does something when mouse click or drag.
I've add declare the popup menu in Application.e4xmi and register it in @PostConstruct as:
service.registerContextMenu(canvas, MENU_ID)

I've confirmed that the MENU_ID is correct, but the context menu is not shown on right click.
My guess is that the mouse listener has some side effects and make the popup menu disable, but we really need to have the mouse listener to work on the graphics in the canvas.
Can someone suggest a way to use mouse listener and the popup menu at the same time?

Thanks
Re: Popup menu for canvas [message #1016490 is a reply to message #1016099] Wed, 06 March 2013 11:39 Go to previous messageGo to next message
Sopot Cela is currently offline Sopot Cela
Messages: 597
Registered: December 2010
Senior Member

Does the error log report some kind of exception ?
Re: Popup menu for canvas [message #1016578 is a reply to message #1016490] Wed, 06 March 2013 19:36 Go to previous message
Li Chen is currently offline Li Chen
Messages: 20
Registered: July 2011
Location: Sydney
Junior Member
No, it just silent and does not show anything when I right click on the canvas.
Also, I checked with the live editor and the pop up menu is declared.
Could you please point me where I should look for event that should display pop up menu?
Previous Topic:Commands in Form Toolbars
Next Topic:Difficulties with tutorial examples
Goto Forum:
  


Current Time: Sat Aug 30 10:39:24 EDT 2014

Powered by FUDForum. Page generated in 0.01643 seconds