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

# TCustomGrid.AutoAdjustColumn

Adjusts column properties to accommodate the largest value in the specified column.

## Declaration

Source position: grids.pas line 982

`protected procedure TCustomGrid.AutoAdjustColumn(`
`aCol: Integer`
`); virtual;`

## Arguments

`aCol` |  | Column number adjusted in the method.

## Description

AutoAdjustColumn is called from the DblClick method when the values goColSizing and goDblClickAutoSize have been included in the Options property.

AutoAdjustColumn has an empty implementation in TCustomGrid, and must be overridden in a descendent class like TCustomStringGrid.

AutoAdjustColumn is called from the AutoAdjustColumns method. It also occurs when the mouse is double-clicked on the cell header and column auto-sizing (goColSizing) has been enabled in the Options for the grid control.

## See also

TCustomGrid.Options |  | Contains the set of optional features and/or behaviors enabled for the grid control.
TCustomGrid.DblClick |  | Performs actions needed to handle mouse double click events in the control.
TCustomGrid.AutoAdjustColumns |  | Automatically adjusts columns sizes to the width of their content.
TCustomStringGrid.AutoAdjustColumn |  | Adjusts the column size for the font, text length, and images used in the specified column.
TGridOptions |  | Set type used to store enabled grid options.