Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Event.{x,y} are zero(I want to find the location of the right-click in a StyleText widget)
Event.{x,y} are zero [message #1713657] Thu, 05 November 2015 18:45
Mark Mising name is currently offline Mark Mising nameFriend
Messages: 73
Registered: July 2009
Location: Ohio, USA
Member
I have a StyledText widget for which a menu pops up when I right-click the mouse. I want to create dynamic MenuItems determined when the menu is shown, but these MenuItems will differ depending on the location of the right-click.

So, I added a SWT.Show listener for my menu, and in the body of the handleEvent(Event e) method, the variable e.x and e.y are both zero! Yikes! My entire handleEvent() code depends on the location of the user-action. How can I determine where in the StyledText widget the user right-clicked the mouse?
Mark
Previous Topic:Enable Debug in Custom Editor
Next Topic:Tooltips for disabled Buttons
Goto Forum:
  


Current Time: Fri Apr 26 18:48:09 GMT 2024

Powered by FUDForum. Page generated in 0.02677 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top