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

# TCustomStringGrid.AutoSizeColumn

AutoSizeColumn - automatically adjust width of column to accommodate widest text

## Declaration

Source position: grids.pas line 1479

`public procedure TCustomStringGrid.AutoSizeColumn(`
`aCol: Integer`
`);`

## Description

This procedure sets the column width to the size of the widest text it finds in all rows for the column aCol.

Tip: see the goDblClickAutoSize option to allow columns to be automatically resized when doubleClicking the column border.

The latest version of this document can be found at lazarus-ccr.sourceforge.net.