Skip to main content



      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 09:48 Go to next message
Eclipse UserFriend
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 10:50 Go to previous messageGo to next message
Eclipse UserFriend
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 16:01 Go to previous message
Eclipse UserFriend
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: Mon Jul 07 05:23:49 EDT 2025

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

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

Back to the top