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 11:08   |
Eclipse User |
|
|
|
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 15:04   |
Eclipse User |
|
|
|
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
|
|
|
Re: Is it possible to click mouse-middle key to pop the popupmenu? [message #445087 is a reply to message #444628] |
Mon, 25 October 2004 15:05  |
Eclipse User |
|
|
|
This seems like a bug in GTK (I assume you are using GTK). It's another
good reason not to fight the operating system. Please enter a problem
report with a stand alone snippet that shows the problem. Thanks.
"lianhw" <java_programmer@sohu.com> wrote in message
news:ckvumk$u4a$1@eclipse.org...
> Thanks a lot!I have successfully changed popupmenu to mouse middle-key,But
> another question is:
>
> On Unix,when click mouse middle-key ,the popupmenu popup, hold the
> middle-key then release the middle-key,the selected menuitem on popupmenu
> can not be selected,in order to select the menuItem,it muse click the
> right-key or the left-key,
>
> how can I make the menuIitem in popupmenu invoked by the middle-key
> released event?!
>
> "Steve Northover" <steve_northover@ca.ibm.com> д
|
|
|
Goto Forum:
Current Time: Thu Jul 10 00:35:48 EDT 2025
Powered by FUDForum. Page generated in 0.29426 seconds
|