Solved

Delphi 5 Tab Order Problems

Posted on 2000-04-20
4
1,006 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Create Database on Android via Delphi dbExpress 3 129
Convert a string into a TDateTime 5 73
Dynamically Created Query 3 70
PHP preg_replace code convert to Delphi 14 82
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
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…

730 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