Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Show Popupmenu
Show Popupmenu [message #500907] Mon, 30 November 2009 09:23 Go to next message
T. Wilhelm is currently offline T. WilhelmFriend
Messages: 129
Registered: July 2009
Senior Member
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 22:39 Go to previous message
Wim Jongman is currently offline Wim JongmanFriend
Messages: 423
Registered: July 2009
Senior Member
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: Tue Mar 19 08:27:01 GMT 2024

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

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

Back to the top