Skip to main content



      Home
Home » Eclipse Projects » GEF » KeyListener in a ViewPart
KeyListener in a ViewPart [message #164087] Mon, 17 January 2005 10:14 Go to next message
Eclipse UserFriend
Originally posted by: fane.classys.net

I have this view which contains a composite which contains a label. Now,
the label already has a MouseListener and a MouseMoveListener attached
to it and they work perfectly. But I also need a KeyListener hooked to
it and just adding it to the label doesn't seem to work. His methods are
never called when a key is pressed. Any ideas? Thanx in advance.
Re: KeyListener in a ViewPart [message #164120 is a reply to message #164087] Mon, 17 January 2005 10:57 Go to previous message
Eclipse UserFriend
Originally posted by: none.us.ibm.com

Using draw2d to build lightweight widgets is not encouraged, but we do it in
the palette. My guess is your Label doesn't have focus. I think that
Clickable is the only figure which accepts focus by default. The focus
methods on Figure behave like AWT or SWT focusing rules.

Maybe you should be using a clickable if your label is so interactive??

"Stefan" <fane@classys.net> wrote in message
news:csgkqr$ebu$1@www.eclipse.org...
>I have this view which contains a composite which contains a label. Now,
>the label already has a MouseListener and a MouseMoveListener attached to
>it and they work perfectly. But I also need a KeyListener hooked to it and
>just adding it to the label doesn't seem to work. His methods are never
>called when a key is pressed. Any ideas? Thanx in advance.
Previous Topic:Watermark
Next Topic:Problem with DirectedGraphLayout With Loopbacks
Goto Forum:
  


Current Time: Wed Jul 30 12:34:10 EDT 2025

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

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

Back to the top