Data Access Getting Started > Designing Windows > Checking the Focus Chain
 
Checking the Focus Chain
The focus chain is the order in which objects in the window own the keyboard focus as the Tab key is pressed repeatedly. When you click the Focus button in the Editing Modes toolbar, a default focus chain path appears in the Main window.
You can edit the focus chain so that the objects own the keyboard focus in any order you wish.
You are now going to change the focus chain so that the order goes through the three form fields from top to bottom, then back to the top.
1. Click the Focus button in the Main window.
A default focus chain appears linking the objects in the work space.
Note: Your default focus chain may not appear exactly as above due to how you manipulated your objects.
2. Delete the arrows from each object by dragging a line from the object and releasing the mouse when the tip of the line is in the work space (but not on another object).
3. Drag a line from anywhere in the work space (but not from another object) to the DEPTNO text field object. When the object is highlighted, release the mouse button.
A filled-in circle appears in the object, signifying that it has become the first focus object.
4. Drag a line from the DEPTNO text field object to the NAME text field object. When the NAME object becomes highlighted, release the mouse button.
An arrow appears going from the DEPTNO object to the NAME object.
5. Drag a line from the NAME object to the MANAGER object.
An arrow appears going from the NAME to MANAGER objects. You have now completed the focus chain, which should look like this:
6. To test the focus chain, click the Test button in the toolbar.
The Test panel appears.
7. Press the Tab key a few times in succession.
The objects become selected in the order of the focus chain you created.
8. Click the Test button again to close the Test panel.
9. Click the Selection mode button in the Main window.

Version 6.1
Copyright © 2016, Rogue Wave Software, Inc. All Rights Reserved.