Eclipse Community Forums - RDF feed
https://www.eclipse.org/forums/
Eclipse Community ForumsHow to open a menu by clicking a button?
https://www.eclipse.org/forums/index.php/mv/msg/145994/459584/#msg_459584
Originally posted by: kevinbrem.discardmail.com
Hi!
I want to show up a drop-down menu by clicking on an additional button
(placed somewhere in a composite). I tried to set the menu visible but
it didn't come up (and checking the visibility afterwards with
isVisible() returned false).
I also tried to open the menu through code, but it wasn't opened either.
If I use the menu in a normal way (by clicking directly on it),
everything works fine.
But how can I achieve to open it via a button (or through the program
directly)?
Thank you for your help!
Cheers, Kevin]]>2005-08-11T17:04:29-00:00Re: How to open a menu by clicking a button?
https://www.eclipse.org/forums/index.php/mv/msg/145994/459776/#msg_459776
This is not currently supported, I presume because it cannot be implemented
on some platforms. It is also an unusual request, since menus that are
triggered by a user action are most conveniently shown close to where the
mouse already is. In your context would it make sense for you to show a
popup instead that had the same items as the drop-down, so that the user
would not have to mouse over to the shell's top-left corner to access the
drop-down menu?
Grant
"Kevin B." <kevinbrem@discardmail.com> wrote in message
news:ddg0d3$vcv$1@news.eclipse.org...
> Hi!
>
> I want to show up a drop-down menu by clicking on an additional button
> (placed somewhere in a composite). I tried to set the menu visible but
> it didn't come up (and checking the visibility afterwards with
> isVisible() returned false).
> I also tried to open the menu through code, but it wasn't opened either.
>
> If I use the menu in a normal way (by clicking directly on it),
> everything works fine.
>
> But how can I achieve to open it via a button (or through the program
> directly)?
>
> Thank you for your help!
> Cheers, Kevin]]>Grant Gayed2005-08-16T13:54:46-00:00Re: How to open a menu by clicking a button?
https://www.eclipse.org/forums/index.php/mv/msg/145994/459781/#msg_459781
Originally posted by: kevinbrem.discardmail.com
Hi Grant!
Grant Gayed schrieb:
> In your context would it make sense for you to show a
> popup instead that had the same items as the drop-down, so that the user
> would not have to mouse over to the shell's top-left corner to access the
> drop-down menu?
Unfortunately a popup-menu is not the solution to my problem.
Nevertheless you helped me with your answer!
If I know, that this isn't possible, that's okay. So I omit it :-)