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

TCustomGrid.AutoFillColumns

Indicates whether columns are automatically resized to fill the visible area in the grid.

Declaration

Source position: grids.pas line 1223

protected property TCustomGrid.AutoFillColumns : Boolean
  read FAutoFillColumns
  write SetAutoFillColumns
  default False;

Description

AutoFillColumns is a Boolean property which enables or disables automatic sizing for columns on the grid control. The default value for the property is False, and indicates that automatic column sizing is not enabled.

Changing AutoFillColumns to True causes the column sizes to be recalculated (and cached) based on default values, or using properties assigned to the TGridColumn instances when the Columns collection has been Enabled. The resizing algorithm works as follows:

Note that TGridColumn instances in Columns are initially created with SizePriority set to 1. For TDbGrid, which automatically populates Columns, this means the user will not be able to resize these columns using the mouse (since they are auto-sized).

Use ColWidths to set the width for a specified column when the Columns collection has not been enabled or populated.

See also

TCustomGrid.ColWidths

  

Provides indexed access to the Width for a column in the grid.

TCustomGrid.Columns

  

Definitions for the columns displayed the grid.

TGridColumns

  

Collection used to store column definitions for a grid control.

TGridColumn.MaxSize

  

The maximum size for the column in pixels.

TGridColumn.MinSize

  

The minimum size for the column in pixels.

TGridColumn.SizePriority

  

The auto-sizing priority for the column.


Version 3.2 Generated 2024-02-25 Home