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

# TCustomStringGrid.AutoSizeColumns

AutoSizeColumns - automatically resizes all columns by adjusting them to fit in the longest text in each column

## Declaration

Source position: grids.pas line 1480

`public procedure TCustomStringGrid.AutoSizeColumns;`

## Description

Automatically resizes all columns by adjusting them to fit in the longest text in each column. This is a quick method of applying AutoSizeColumn() for every column in the grid.

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