[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] | Reference for unit 'Grids' (#lcl)

# TCustomGrid.GetFirstVisibleColumn

Gets the column number for the first visible non-fixed column in the grid.

## Declaration

Source position: grids.pas line 1117

`protected function TCustomGrid.GetFirstVisibleColumn: Integer;`

## Function result

Column number for the first visible column.

## Description

GetFirstVisibleColumn is an Integer function used to get the column number for the first visible non-fixed column in the grid. A visible column is one which starts after the fixed columns specified in FixedCols and has a non-zero width for the column in ColWidths.

The return value contains the column number (zero-based) for the column matching the criteria. If a non-fixed column with a non-zero width is not found, the return value is set to ColCount.

GetFirstVisibleColumn is called from the KeyDown method when handling Tab key navigation for the grid control.

## See also

TCustomGrid.FixedCols |  | The number of fixed columns in the grid.
TCustomGrid.ColCount |  | Number of columns in the grid.
TCustomGrid.ColWidths |  | Provides indexed access to the Width for a column in the grid.
TCustomGrid.KeyDown |  | Handles key down events for the grid control.