Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Menu not showing, even though isVisible() says true
Menu not showing, even though isVisible() says true [message #447004] |
Tue, 07 December 2004 17:19 |
Eddie Galvez Messages: 103 Registered: July 2009 |
Senior Member |
|
|
I have a JFrame embedded in an editor, and I'm wrapping calls that used
to show JPopupMenus to SWT and wanting a Menu to popup. I've got the
thread accesses all set, but this is what happens:
When I create a Menu, I have to choose a parent. I set the parent to
be the composite that the JFrame embeds in. The first time I click on
the particular object, I route the request for the popup to SWT and show
a Menu. That displays. If I right click again at the same spot, debug
printouts show the request coming all the way again, the location is
right, the same code, and I even call Menu.isVisible() and it says true
after I call setVisible(true), but the Menu is nowhere to be found. Any
ideas?
Thank you,
Eddie
|
|
|
Re: Menu not showing, even though isVisible() says true [message #447064 is a reply to message #447004] |
Wed, 08 December 2004 05:25 |
Eclipse User |
|
|
|
Originally posted by: our_snaps.sify.com
just try adding an appropriate listener to the composite.
just a suggestion
Eddie Galvez wrote:
> I have a JFrame embedded in an editor, and I'm wrapping calls that used
> to show JPopupMenus to SWT and wanting a Menu to popup. I've got the
> thread accesses all set, but this is what happens:
> When I create a Menu, I have to choose a parent. I set the parent to
> be the composite that the JFrame embeds in. The first time I click on
> the particular object, I route the request for the popup to SWT and show
> a Menu. That displays. If I right click again at the same spot, debug
> printouts show the request coming all the way again, the location is
> right, the same code, and I even call Menu.isVisible() and it says true
> after I call setVisible(true), but the Menu is nowhere to be found. Any
> ideas?
> Thank you,
> Eddie
|
|
| |
Re: Menu not showing, even though isVisible() says true [message #447111 is a reply to message #447004] |
Wed, 08 December 2004 18:18 |
Paul Singleton Messages: 37 Registered: July 2009 |
Member |
|
|
Are you sure it still has some MenuItems at the second hit?
If it has none, I guess setVisible(true) would succeed but
you wouldn't see anything?
Paul Singleton
Eddie Galvez wrote:
> I have a JFrame embedded in an editor, and I'm wrapping calls that used
> to show JPopupMenus to SWT and wanting a Menu to popup. I've got the
> thread accesses all set, but this is what happens:
> When I create a Menu, I have to choose a parent. I set the parent to be
> the composite that the JFrame embeds in. The first time I click on the
> particular object, I route the request for the popup to SWT and show a
> Menu. That displays. If I right click again at the same spot, debug
> printouts show the request coming all the way again, the location is
> right, the same code, and I even call Menu.isVisible() and it says true
> after I call setVisible(true), but the Menu is nowhere to be found. Any
> ideas?
>
> Thank you,
> Eddie
|
|
| |
Re: Menu not showing, even though isVisible() says true [message #447210 is a reply to message #447004] |
Thu, 09 December 2004 15:46 |
Steve Northover Messages: 1636 Registered: July 2009 |
Senior Member |
|
|
Even though isVisible() says that a control is visible, the control might
not actually have painted until you get back to the event loop. This may be
what you are seeing with menus. You'll need a stand alone snippet so that
we can debug this.
"Eddie Galvez" <eddie@streambase.com> wrote in message
news:cp4omg$mfr$1@www.eclipse.org...
> I have a JFrame embedded in an editor, and I'm wrapping calls that used
> to show JPopupMenus to SWT and wanting a Menu to popup. I've got the
> thread accesses all set, but this is what happens:
> When I create a Menu, I have to choose a parent. I set the parent to
> be the composite that the JFrame embeds in. The first time I click on
> the particular object, I route the request for the popup to SWT and show
> a Menu. That displays. If I right click again at the same spot, debug
> printouts show the request coming all the way again, the location is
> right, the same code, and I even call Menu.isVisible() and it says true
> after I call setVisible(true), but the Menu is nowhere to be found. Any
> ideas?
>
> Thank you,
> Eddie
|
|
|
Goto Forum:
Current Time: Mon Sep 23 22:55:41 GMT 2024
Powered by FUDForum. Page generated in 0.04420 seconds
|