Tab order

Hi,

What is the correct method to set the tab order for controls on a web page? I tried using the Tab Order option from the Form Designer context menu and also tried setting the tabIndex property in the form show. Both approaches do not work. Would appreciate some insights into this. The form in question just has a few TWebEdit, some check boxes and a memo.

Regards

Control.TabOrder is a direct interface to set the underlying control HTML element TabIndex attribute. The TabIndex attribute controls the tab order in a web page.

So, if you use TabOrder this way so the TabIndex gets the desired value for navigation, this should work.

Hi Bruno.

While the taborder property does set the underlying tab index property, my issue occurs only when I show a modal form. To explain, assume my home page has 3-4 buttons for which I set the TabOrder property to enable the user to cycle through the controls in the correct order. From this home page I popup a modal form (using ShowModal). This modal form has 3-4 TWebEdit controls - again I set the TabOrder to enable the correct sequence. However when using the tab key it also cycles through the controls on the HomePage where the tab order is set. Is there something I am missing in my implementation? Can you point me to the correct method to achieve correct Tab sequence?

Wishing you and the team a very happy 2025!

Warm regards

Any solution?

This is a non-trivial situation in a browser window. The easiest solution is to close the form from where the new form is shown or alternatively, set the TabStop = false on controls before showing the new form.
We are investigating easier and more automatic solutions for this.

I was having the same issue and was able to solve easily. In the new form I start the TabOrder of the controls to start with 100 and start numbering the following controls from there. It prevents the focus to jump back to the main form when tabbing in the new form. So, each form has a new starting number like at 100, 200, etc. the starting must be higher that the TabOrder values on the main form.

1 Like