Sign in Join
FPDoc Onlineexperiment

TCustomGrid.DefaultColWidth property

Member of TCustomGridprotectedIn unit Grids

Default width used for grid columns.

Declaration

pascal
property DefaultColWidth: Integer read GetDefColWidth write SetDefColWidth stored DefaultColWidthIsStored;

Description

DefaultColWidth is an Integer property with the default width for a new column added to the grid control. If new columns of the grid are created by changing the ColCount property, the width of these new columns will be set to the value in the DefaultColWidth property.

A negative non-zero value in the property member indicates that the value in the DEFCOLWIDTH constant is scaled to the PPI setting for the Font used on the control. Use 0 as the width for an auto-sized column. Changing the value for the property causes existing values in Cols to be reset to -1 to force the columns to be scaled and updated. The position for a visible Editor control is also updated when the property value is changed.

DefaultColWidth is used as the default when reading values from the indexed ColWidths property.

See also

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