Solved

Delphi 5 Tab Order Problems

Posted on 2000-04-20
4
994 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

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…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…

771 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

10 Experts available now in Live!

Get 1:1 Help Now