VSFlexGrid Control > VSFlexGrid Properties, Events, and Methods > VSFlexGrid Properties > TabBehavior Property |
Returns or sets whether the tab key will move focus between controls (VB default) or between grid cells.
[form!]VSFlexGrid.TabBehavior[ = TabBehaviorSettings ]
The settings for the TabBehavior property are described below:
Constant |
Value |
Description |
flexTabControls |
0 |
Tab key is used to move to the next or previous control on the form. |
flexTabCells |
1 |
Tab key is used to move to the next or previous cell on the control. |
The example below sets the tab key to move to the next control when in the last cell of the grid:
Private Sub fg_GotFocus()
fg.Select fg.FixedRows, fg.FixedCols
End Sub
Private Sub fg_EnterCell()
If fg.Col = fg.Cols - 1 And fg.Row = fg.Rows - 1 Then
fg.TabBehavior = flexTabControls
Else
fg.TabBehavior = flexTabCells
End If
End Sub
TabBehaviorSettings (Enumeration)
flexTabControls (0)