[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.platform.swt] Re: How to set Canvas focusable (with keyboard traverse)?

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.