Changing the window's tab order

You can view and modify the tab order of a window’s controls through the tab order formatting mode of PocketBuilder. (You can also change the tab order of an individual control on the Other tab of the control’s Properties view.)

Figure 11-1: Viewing the tab order of controls

From top to bottom, the sample shows the three button controls Add, Update, and Delete. At the upper right corners of the buttons are the tab values 10, 20, and 30, respectively.

StepsTo change the tab order:

  1. Select Format>Tab Order from the menu bar, or click the Tab Order button on PainterBar1 (next to the Preview button).

    The current tab order displays. If this is the first time you have used Tab Order for the window, the default tab order displays.

  2. Use the mouse or the Tab key to move the pointer to the tab value you want to change.

  3. Enter a new tab value from 0 to 9999.

    The value 0 removes the control from the tab order. Other than 0, the exact value you use does not matter. Only the relative value is significant. For example, if you want the user to tab to control B after control A but before control C, set the tab value for control B so it is between the value for control A and the value for control C.

    NoteTab tips A tab order value of 0 does not prevent a control from being selected or activated, or from receiving keyboard events. To prevent a user from activating a control, clear the Enabled check box on its General properties page.

    To permit tabbing in a group box, change the tab value of the GroupBox control to 0, then assign nonzero tab values to the controls in the group box.

  4. Repeat the procedure until you have the tab order you want.

  5. Select Format>Tab Order or the Tab Order button again.

    PocketBuilder saves the tab order.

Each time you select Tab Order, PocketBuilder renumbers the tab order values to include any controls that have been added to the window and to allow space to insert new controls in the tab order. For example, if the original tab values for controls A, B, and C were 10, 20, and 30, and you insert control D between A and B and give it a tab value of 15, then when you select tab order again, the controls A, B, and C will have the tab values 10, 30, and 40, and control D will have the tab value 20.