Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » How to set Canvas focusable (with keyboard traverse)?
How to set Canvas focusable (with keyboard traverse)? [message #449320] Fri, 21 January 2005 16:27 Go to next message
Alexander Kitaev is currently offline Alexander KitaevFriend
Messages: 2
Registered: July 2009
Junior Member
Hello,

I'm writing a custom drawn SWT widget and my widget class extends Canvas.
Everething works pretty well, the only problem is that my widget doesn't
receive focus when traversing with the "Tab" key. Nor setFocus, neither
forceFocus methods a called. Programm call of setFocus method works fine -
my widget become focused (i.e. isFocusedComponent() returns true).

My question is how to make traversal focus keys work properly with my
widget?

Thanks,
Alexander Kitaev.
Re: How to set Canvas focusable (with keyboard traverse)? [message #449323 is a reply to message #449320] Fri, 21 January 2005 18:14 Go to previous message
Alexander Kitaev is currently offline Alexander KitaevFriend
Messages: 2
Registered: July 2009
Junior Member
Finally after I understood what the problem was - to make Canvas
subclass focusable with the traversion keys one have to hook at least
one of SWT.keyDown or SWT.keyUp events, otherwise widget will be skipped
when traversing by tab order.

Alexander Kitaev wrote:
> Hello,
>
> I'm writing a custom drawn SWT widget and my widget class extends
> Canvas. Everething works pretty well, the only problem is that my widget
> doesn't receive focus when traversing with the "Tab" key. Nor setFocus,
> neither forceFocus methods a called. Programm call of setFocus method
> works fine - my widget become focused (i.e. isFocusedComponent() returns
> true).
>
> My question is how to make traversal focus keys work properly with my
> widget?
>
> Thanks,
> Alexander Kitaev.
Previous Topic:TableViewer and ProgressBar
Next Topic:How do you assign an icon to an ApplicationWindow?
Goto Forum:
  


Current Time: Sun Nov 17 14:53:53 GMT 2019

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

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

Back to the top