Show Popupmenu [message #500907] |
Mon, 30 November 2009 04:23  |
Eclipse User |
|
|
|
Hey all,
i want to show a popupmenu on my composite. My composite contains some labels and textfields. When i add my popup menu to the composite it will only be shown when i click between my labels and textfields.
For textfields there is the standard popupmenu which is ok, but when i click on label my popupmenu should be shown, how can i do this without adding a listener to all my labels? Doesnt the composite inherit his popupmenu to labels?
Thanks a lot
|
|
|
Re: Show Popupmenu [message #501079 is a reply to message #500907] |
Mon, 30 November 2009 17:39  |
Eclipse User |
|
|
|
Hi T,
No, that is not possible. You have to label.setMenu(popup) for every label. I
tried the setCapture(true) method but it does not do the trick. See SWT
snippet 40:
http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.swt.sni ppets/src/org/eclipse/swt/snippets/Snippet40.java?view=co
--
Best Regards,
Wim Jongman
-- Does fuzzy logic tickle?
(Eclipse Old Skool Quote Service)
> Hey all,
>
> i want to show a popupmenu on my composite. My composite contains some
labels and textfields. When i add my popup menu to the composite it will only
be shown when i click between my labels and textfields.
> For textfields there is the standard popupmenu which is ok, but when i
click on label my popupmenu should be shown, how can i do this without adding
a listener to all my labels? Doesnt the composite inherit his popupmenu to
labels?
> Thanks a lot
|
|
|
Powered by
FUDForum. Page generated in 0.36613 seconds