Solved

Delphi 5 Tab Order Problems

Posted on 2000-04-20
4
1,001 Views
Last Modified: 2008-02-01
I am having problems with Delphi 5's Tab Order feature.  I have controls on a tabbed sheet that are on different tab order lists so I can't get the tab order correct on any of my tabbed pages.  By this I mean, I can choose one control on my form and then choose Edit|Tab Order.  I will get a list of most of the controls on the tab.  Then I can click on a control on the same form that was not in the previous tab order list, go to Edit|Tab order and see a list of the remaining controls on the form.  I have tried to fix the tab order using the object inspector, but that doesn't work either.  This never happened to me in previous versions of Delphi.

Has anyone else experienced this problem?  How can I correct the tab order.

Thanks.
0
Comment
Question by:oasys
4 Comments
 
LVL 2

Expert Comment

by:hhamster
ID: 2735621
I tried this and its work OK. There is no mention of such problem on borland community and I never have problems like this. Its rather that you messed up with something.

When you have one container for controls, mark it active and click 'Tab order...' (for example: pannel1). Then repeat the step for every one on your form. After that click the container of the containers you have just ordered, mark it active and click 'Tab order...' (for example form1). After starting this must work fine.

You can also check the 'Tab order' property in the 'Object inspector'. It goes from 0..n for every component container, and from 0..n for every container of previous containers.

Good luck.
0
 

Expert Comment

by:JimboKern69
ID: 2735622
Oasys,

Please make sure that you do not have these individual controls on any "container" objects.  In other words:

Perhaps there is a panel or a group box of some sort underlying these groups of controls which show up together in the Tab order lists.

Controls which have the same Parent are grouped together for Tab-ordering.  If you drop a few controls on a form, then drop a panel and a few more controls on the panel, you will notice:

1- If you ask for the tab ordering of a control NOT on the panel, you should SEE the panel in the tab-ordering list.

2- If you ask for the tab ordering of a control ON the panel, you should see only those controls on the panel.

That's the only thing I can think of.

Jim
0
 

Accepted Solution

by:
belgianbasman earned 50 total points
ID: 2737619
I think JimboKern has got it right.  It probably has something to do with the "scope" of the components you're dealing with.

One way around this is to write little fragments of code in the "onExit" events of some components.
For instance, let's say you have two edit boxes (Edit1 and Edit2) in panel A and another edit box (Edit3) in panel B. You want the tab order to be First Edit1, Edit3, Edit2.
Then you would insert the following lines of code :
In the onExit event of Edit1 :
     Edit3.SetFocus;
In the onExit event of Edit3 :
     Edit2.SetFocus;

That should do the trick.

Cheers,

basman
0
 

Author Comment

by:oasys
ID: 2743710
JimboKern69 and belgianbasman are both correct.  It is a scope problem.  I added a panel and most of the controls one day.  The next day I added more controls and the tab order seemed to reset.  I did not connect that to the panel  but after hearing the answers I see that  is my problem.

Thanks so much for your quick response.
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question