Skip to main content



      Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Show Popupmenu
Show Popupmenu [message #500907] Mon, 30 November 2009 04:23 Go to next message
Eclipse UserFriend
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 Go to previous message
Eclipse UserFriend
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
Previous Topic:Maven ?
Next Topic:Progress Monitor freezes when app loses focus
Goto Forum:
  


Current Time: Fri Jul 04 15:19:58 EDT 2025

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

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

Back to the top