Home Forums General XMetaL Discussion Controlling the tab order of elements in an xft form Reply To: Controlling the tab order of elements in an xft form

Derek Read

Reply to: Controlling the tab order of elements in an xft form

If you are looking for something like VB has, where you can give controls a number, we don't have that unfortunately. That would be nice I agree, but the solution is simple because the tab order is added to each item you place on a form as you add it.

There are two options:

1. Once your form is built the way you like, remove each item using Cut (Ctrl+X) followed immediately by Paste (Ctrl+V) to put it back where it was. Do this for each control in the order you wish them to be tabbed to.

2. This is the better solution as it offers you assurance that things will be done correctly (ie: you can examine your code to see the tab order). Inside an event (like OnInitialize) write a script that hides then shows each of the controls you wish to tab to:

//JScript: Fix up tab order for controls.
//First, hide everything (order here is not important).
ComboBox1.Visible = false;
ComboBox2.Visible = false;
EditBox1.Visible = false;
Button1.Visible = false;
//Second, make controls visible in the order you wish the tab order to be.
//Note that the order here is important.
ComboBox1.Visible = true;
ComboBox2.Visible = true;
EditBox1.Visible = true;
Button1.Visible = true;

Reply

Products
Downloads
Support