Sign in Join
FPDoc Onlineexperiment

TCustomStringGrid.AutoSizeColumns procedure

Member of TCustomStringGridpublicIn unit Grids

Resizes all columns to accommodate the longest text value in each column.

Declaration

pascal
procedure AutoSizeColumns

Description

Automatically resizes all columns by adjusting them to fit in the longest text in each column. This is a quick way to perform the AutoAdjustColumn method for every column in the grid.

AutoSizeColumns calls the AutoAdjustColumn method for column numbers in the range 0..ColCount-1. Calculated column widths are stored at the corresponding positions in the ColWidths property.

Use AutoSizeColumn to adjust the width for a single column on the grid control.

See also

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.