Solved

Delphi 5 Tab Order Problems

Posted on 2000-04-20
4
1,005 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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

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…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

808 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