Mega Search
23.2 Million


Sign Up

Make a donation  
TabOrder accros multiple Groupboxes [Edit]  
News Group: embarcadero.public.delphi.language.delphi.general

I have this Form, on which is a GroupBox with multiple components.
Below that is a TEdit and TMemo directly on the Form.
Below that is a GroupBox with a OK button.

I need the TabOrder to follow a certain order in the first GroupBox, followed by the TMemo, then the TEdit andf finally the OK button.

The IDE will not let me do that.

The reason of the first GroupBox is the way the form resizes, as it is set to Allign=alTop, the TEdit below is also set to alTop and  the TMemo is set to alClient and the last GroupBox is set to alBottom.

How do I force the TabOrder to go across the various areas in the right order?

Bart
--
Bart Kindt, CEO and developer
SARTrack Limited New Zealand
http://www.sartrack.co.nz/

Vote for best question.
Score: 0  # Vote:  0
Date Posted: 18-Jan-2015, at 1:10 PM EST
From: Bart Kindt
 
Re: TabOrder accros multiple Groupboxes [Edit]  
News Group: embarcadero.public.delphi.language.delphi.general
> {quote:title=Remy Lebeau (TeamB) wrote:}{quote}

Yes, that did the trick.

Many thanks, Bart

> Remy Lebeau (TeamB)

--
Bart Kindt, CEO and developer
SARTrack Limited New Zealand
http://www.sartrack.co.nz/

Vote for best answer.
Score: 0  # Vote:  0
Date Posted: 18-Jan-2015, at 2:23 PM EST
From: Bart Kindt
 
Re: TabOrder accros multiple Groupboxes [Edit]  
News Group: embarcadero.public.delphi.language.delphi.general
Bart wrote:

> I need the TabOrder to follow a certain order in the first GroupBox,
> followed by the TMemo, then the TEdit andf finally the OK button.

Make sure that the GroupBoxes themselves are set to TabStop=false, and the 
other controls are set to TabStop=true.  Then set the 1st GroupBox to TabOrder=0, 
the TMemo to TabOrder=1, the TEdit to TabOrder=2, and the 2nd GroupBox to 
TabOrder=3.  Then set the 1st GroupBox's child controls to TabOrder=0-(N-1) 
(where N is the number of child controls) as needed, and the 2nd GroupBox's 
OK button to TabOrder=0.

You can also assign the TabOrder values visually by right-clicking on the 
Form and GroupBoxes individually and using the "Tab Order" dialog to arrange 
the controls in the order you want.

> The IDE will not let me do that.

Works fine for me when I do it.

> The reason of the first GroupBox is the way the form resizes, as it is
> set to Allign=alTop, the TEdit below is also set to alTop and  the
> TMemo is set to alClient and the last GroupBox is set to alBottom.

Alignment has no effect on TabOrder.  I was able to create a Form with the 
Align and TabStop settings you have described, and it works correctly at 
run-time as expected.

-- 
Remy Lebeau (TeamB)

Vote for best answer.
Score: 0  # Vote:  0
Date Posted: 18-Jan-2015, at 1:40 PM EST
From: Remy Lebeau (TeamB)
 
Re: TabOrder accros multiple Groupboxes  
News Group: embarcadero.public.delphi.language.delphi.general
> {quote:title=Bart Kindt wrote:}{quote}
> I have this Form, on which is a GroupBox with multiple components.
> Below that is a TEdit and TMemo directly on the Form.
> Below that is a GroupBox with a OK button.
> 
> I need the TabOrder to follow a certain order in the first GroupBox, followed by the TMemo, then the TEdit andf finally the OK button.
> 
> The IDE will not let me do that.
> 
> The reason of the first GroupBox is the way the form resizes, as it is set to Allign=alTop, the TEdit below is also set to alTop and  the TMemo is set to alClient and the last GroupBox is set to alBottom.
> 
> How do I force the TabOrder to go across the various areas in the right order?
> 
> Bart
> --
> Bart Kindt, CEO and developer
> SARTrack Limited New Zealand
> http://www.sartrack.co.nz/

Bart which platform / version are you using. There were many issues in early FMX versions with Tab order locking to creation order (I tasked one Jnr in XE2 or XE3 with opening 700 FMX files and HAND moving the controls :) )  and not being handled at all on Frames (if that's your issues look in QC for Frames and comments by me for some work arounds)

--
Linden
"Mango" was Cool but "Wasabi" was Hotter but remember it's all in the "source"

Vote for best answer.
Score: 0  # Vote:  0
Date Posted: 18-Jan-2015, at 1:19 PM EST
From: Linden ROTH