Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » How to show a popup menu at cursor location, with no "parent"
How to show a popup menu at cursor location, with no "parent" [message #447077] Wed, 08 December 2004 14:48 Go to next message
Eddie Galvez is currently offline Eddie GalvezFriend
Messages: 103
Registered: July 2009
Senior Member
To create a popup menu it looks like Menu wants a parent. Now what if I
wanted to create a popup menu, not associated to any component. I just
want to show a menu at the cursor location randomly, say. How can I do that?

Thanks,
Eddie
Re: How to show a popup menu at cursor location, with no "parent" [message #447104 is a reply to message #447077] Wed, 08 December 2004 15:50 Go to previous messageGo to next message
Steve Northover is currently offline Steve NorthoverFriend
Messages: 1636
Registered: July 2009
Senior Member
The parent of a Menu is always a Shell. You can position a menu anywhere
you want using Menu.setLocation().

"Eddie Galvez" <eddie@streambase.com> wrote in message
news:cp748j$fao$2@www.eclipse.org...
> To create a popup menu it looks like Menu wants a parent. Now what if I
> wanted to create a popup menu, not associated to any component. I just
> want to show a menu at the cursor location randomly, say. How can I do
that?
>
> Thanks,
> Eddie
Re: How to show a popup menu at cursor location, with no "parent" [message #447118 is a reply to message #447104] Wed, 08 December 2004 21:01 Go to previous message
Eddie Galvez is currently offline Eddie GalvezFriend
Messages: 103
Registered: July 2009
Senior Member
Oh, I see. So I could just pass my application's shell as parent, and
display it anywhere I want. I'll try that to get my menu showing
(related post I posted earlier)...

Thanks,
Eddie

Steve Northover wrote:
> The parent of a Menu is always a Shell. You can position a menu anywhere
> you want using Menu.setLocation().
>
Previous Topic:My JOptionPane.showOptionDialog isnt working
Next Topic:Getting Menu to show in applet
Goto Forum:
  


Current Time: Wed Oct 28 20:02:39 GMT 2020

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

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

Back to the top