Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Is it possible to click mouse-middle key to pop the popupmenu?
| |
Re: Is it possible to click mouse-middle key to pop the popupmenu? [message #444589 is a reply to message #444588] |
Fri, 15 October 2004 15:08 |
Paul Singleton Messages: 37 Registered: July 2009 |
Member |
|
|
Steve Northover wrote:
> Ok, assuming you want this on mouse down, don't use SWT.MenuDetect or
> Control.setMenu(). Instead, call Menu.setVisible() from inside an
> SWT.MouseDown handler when button == 2. NOTE: Doing this will make your
> users mad because your application will not be using the platform specific
> mouse and key sequences to request a popup menu. For example, on Windows
> it's right button up,
.... or Shift+F10 - please don't forget the keyboard
equivalents (presumably Linux and Mac have their own).
IIRC a MenuDetect event doesn't distinguish keyboard
from mouse origination, yet gives you mouse coords which
may be over the wrong widget :-/ for which I can find
no workaround.
I know, I know, I should go find the bug and vote for it,
but since you were quite rightly recommending MenuDetect,
I thought you might be susceptible to being reminded that
it ain't all there yet :-)
> on Linux right button down, on a single button Mac
> Ctrl+Click etc.
> "lianhw" <java_programmer@sohu.com> wrote in message
> news:cko7qp$n64$1@eclipse.org...
>
>>I do not want to click mouse right-key to pop the popmenu,I want to change
>>to the middle key in SWT,how can I do?
Paul Singleton
|
|
| |
Re: Is it possible to click mouse-middle key to pop the popupmenu? [message #445085 is a reply to message #444589] |
Mon, 25 October 2004 19:04 |
Steve Northover Messages: 1636 Registered: July 2009 |
Senior Member |
|
|
Over the wrong widget? The x and y coordinates are in screen coordinates.
Is that the problem?
"Paul Singleton" <paul@jbgb.com> wrote in message
news:ckooru$r31$1@eclipse.org...
> Steve Northover wrote:
> > Ok, assuming you want this on mouse down, don't use SWT.MenuDetect or
> > Control.setMenu(). Instead, call Menu.setVisible() from inside an
> > SWT.MouseDown handler when button == 2. NOTE: Doing this will make your
> > users mad because your application will not be using the platform
specific
> > mouse and key sequences to request a popup menu. For example, on
Windows
> > it's right button up,
>
> ... or Shift+F10 - please don't forget the keyboard
> equivalents (presumably Linux and Mac have their own).
>
> IIRC a MenuDetect event doesn't distinguish keyboard
> from mouse origination, yet gives you mouse coords which
> may be over the wrong widget :-/ for which I can find
> no workaround.
>
> I know, I know, I should go find the bug and vote for it,
> but since you were quite rightly recommending MenuDetect,
> I thought you might be susceptible to being reminded that
> it ain't all there yet :-)
>
> > on Linux right button down, on a single button Mac
> > Ctrl+Click etc.
>
> > "lianhw" <java_programmer@sohu.com> wrote in message
> > news:cko7qp$n64$1@eclipse.org...
> >
> >>I do not want to click mouse right-key to pop the popmenu,I want to
change
> >>to the middle key in SWT,how can I do?
>
> Paul Singleton
|
|
| |
Goto Forum:
Current Time: Thu Mar 28 19:18:13 GMT 2024
Powered by FUDForum. Page generated in 0.02789 seconds
|