2 Replies Latest reply on Jul 15, 2009 3:01 AM by SilverFox64

    How do I find the X and Y position of a ContextMenu?


      I have created a custom ContextMenuItem and added it to the ContextMenu. The custom menu item has a listener and this all works as intended. However, I need to calculate the position of the cursor when I right click, this also corresponds to the top left corner of the ContextMenu.


      The problem I have is that these values do not seem to be stored and I do not know how they can be calculated. The mouseTarget x and y values that are stored in the ContextMenuEvent relate to the mouse position when the menu item is clicked not the position of the right click.


      Any help would be appreciated.