Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Label mnemonics if Control's following are Composites
Label mnemonics if Control's following are Composites [message #445247] Fri, 29 October 2004 15:03 Go to next message
Eddie Galvez is currently offline Eddie GalvezFriend
Messages: 103
Registered: July 2009
Senior Member
What can I do in this case?

I have a Label, using a mnemonic. Following that label a Composite is always
created. Then, a control such as a Text may be created. I notice the
mnemonic goes to the Composite. What can I do to make the intermediary
composites skip taking the focus control? I tried adding a focus listener,
looks like they never get a focusGained event.

In general, why do composites "get the focus" anyways?

Thanks,
Eddie
Re: Label mnemonics if Control's following are Composites [message #445248 is a reply to message #445247] Fri, 29 October 2004 15:21 Go to previous messageGo to next message
Eddie Galvez is currently offline Eddie GalvezFriend
Messages: 103
Registered: July 2009
Senior Member
I should add, the controls are all inside a GridLayout, in particular, the
item I want the mnemonic to go to is on the next column.
Re: Label mnemonics if Control's following are Composites [message #445250 is a reply to message #445248] Fri, 29 October 2004 17:21 Go to previous message
Veronika Irvine is currently offline Veronika IrvineFriend
Messages: 1272
Registered: July 2009
Senior Member
On Windows, Label sets the focus to the next child in the z order (after
itself) of its parent. If the next child is a Composite, focus is set to
the first child of the composite that will take focus (this may go down the
widget tree several levels before finding a widget that will take focus).
The behaviour, however, may vary from platform to platform because of OS
differences.

If you need to have a label be the mnemonic for a widget that is not the
next widget in the z-order, you should consider using a FormLayout which
does not use the z-order to determine placement of children.

"Eddie Galvez" <eddie@_nospam_grassybrook.com> wrote in message
news:cltn1v$vib$1@eclipse.org...
>I should add, the controls are all inside a GridLayout, in particular, the
>item I want the mnemonic to go to is on the next column.
>
>
Previous Topic:CLabel's don't do mnemonics?
Next Topic:possible to change the location of a currently added tableItem in a swt table
Goto Forum:
  


Current Time: Sun Oct 25 05:35:55 GMT 2020

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

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

Back to the top