TabBehavior Property

Returns or sets whether the TAB key will move focus between controls (VB default) or between grid cells.

Syntax

[form!]VSFlexGrid.TabBehavior[ = TabBehaviorSettings ]

Remarks

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

Data Type

TabBehaviorSettings (Enumeration)

Default Value

flexTabControls (0)

See Also

VSFlexGrid Control