Solved

Delphi 5 Tab Order Problems

Posted on 2000-04-20
4
998 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
This is a video that shows how the OnPage alerts system integrates into ConnectWise, how a trigger is set, how a page is sent via the trigger, and how the SENT, DELIVERED, READ & REPLIED receipts get entered into the internal tab of the ConnectWise …
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

948 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now