Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Excluding custom Composite from tab order
Excluding custom Composite from tab order [message #466599] Wed, 11 January 2006 20:48 Go to next message
Peter Nehrer is currently offline Peter NehrerFriend
Messages: 241
Registered: July 2009
Senior Member
Hi,

I have a custom Composite (with two Labels in it), which I use within a
form Section. When tabbing through other controls in the section, focus
gets "eaten" by the custom composite -- can't tab out of it again (until
I click some other focusable control).

I understand that I can implement TraverseListener and set e.doit = true
to make this piece work, but what I really want to do is make this
composite behave like a Label in that I want it to be skipped altogether
when traversing. I also know that I can do this by excluding the
composite from its parent's tablist.

However, this would require me to modify code outside of the custom
composite itself -- after the parent is constructed, remove all
instances of this custom composite from its tablist.

Is there anything I can do to the custom composite itself to cause any
parents to skip it when traversing?

Thanks in advance for any suggestions.

--Peter
Re: Excluding custom Composite from tab order [message #466672 is a reply to message #466599] Thu, 12 January 2006 19:56 Go to previous messageGo to next message
Veronika Irvine is currently offline Veronika IrvineFriend
Messages: 1272
Registered: July 2009
Senior Member
Do not add any KeyListener to your custom control and it will not be in the
tab order.

"Peter Nehrer" <pnehrer@freeshell.org> wrote in message
news:dq3qub$rok$1@utils.eclipse.org...
> Hi,
>
> I have a custom Composite (with two Labels in it), which I use within a
> form Section. When tabbing through other controls in the section, focus
> gets "eaten" by the custom composite -- can't tab out of it again (until I
> click some other focusable control).
>
> I understand that I can implement TraverseListener and set e.doit = true
> to make this piece work, but what I really want to do is make this
> composite behave like a Label in that I want it to be skipped altogether
> when traversing. I also know that I can do this by excluding the composite
> from its parent's tablist.
>
> However, this would require me to modify code outside of the custom
> composite itself -- after the parent is constructed, remove all instances
> of this custom composite from its tablist.
>
> Is there anything I can do to the custom composite itself to cause any
> parents to skip it when traversing?
>
> Thanks in advance for any suggestions.
>
> --Peter
Re: Excluding custom Composite from tab order [message #466673 is a reply to message #466672] Thu, 12 January 2006 20:10 Go to previous message
Peter Nehrer is currently offline Peter NehrerFriend
Messages: 241
Registered: July 2009
Senior Member
Veronika,

thanks for the tip -- indeed the composite was being adapted by
FormToolkit in such a way that a key listener was (unnecessarily)
installed on it. It now works as required.

--Peter
Previous Topic:multi-select in trees on linux
Next Topic:How to detect refresh event in Browser
Goto Forum:
  


Current Time: Thu Dec 26 15:05:38 GMT 2024

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

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

Back to the top