tabKey

Type: Integer

Availability: Read or write at any time

The tabKey property of the Table class implements tabbing within a table and contains the key that is used to tab within cells of a table. By default, the tabKey property is set to null (0), and movement within the table is controlled only from the keyboard by using the arrow keys.

When you set the tabKey property to a key code (accessed from the keyCode parameter in the keyDown event method), the next visible cell to the right of the current position in the table becomes the current cell when the specified key is pressed. (The column property is updated and the rowColumnChg event method is called if the queryRowColChg event method does not deny the change.)

If the current cell is the last visible cell in the row, pressing the specified tab key moves to the first visible non-fixed cell in the next row unless the current row is the last visible row, in which case the first visible non-fixed row becomes the current row.

If the Shift key is pressed with the key specified for the tabKey property, the previous visible cell in the current row becomes the current cell until the first visible non-fixed column is reached. If the first visible non-fixed cell in a row is already the current cell, pressing the Shift key and the key specified in the tabKey property moves to the last visible column of the previous row unless the current row is the first visible non-fixed row, in which case the last visible row becomes the current row. The key code can be any key, including the tab key specified by using the J_key_Tab global constant in the KeyCharacterCodes category. The Table control class intercepts the use of this key when the table or any of its children has focus. That key is then used only for tabbing within the table, and any other previous meaning to the table or its children is ignored.

To tab to the next control in the tab sequence when the tabKey property is set to the tab key (that is, the J_key_Tab global constant in the KeyCharacterCodes category, which has an integer value of 09), use the Ctrl+Tab key combination. The Ctrl+Shift+Tab key combination tabs to the previous control in the tab sequence. This applies only to forms that are not MDI forms.

The code fragment in the following example shows the use of the tabKey property.

table1.tabKey := J_key_Tab;