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

TCustomGrid.DefaultColWidth

Default width used for grid columns.

Declaration

Source position: grids.pas line 1236

protected property TCustomGrid.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

TCustomGrid.DefaultRowHeight

  

Default row height for newly created grid rows.

TCustomGrid.ResetDefaultColWidths

  

Restores the default width for columns in the grid.

TCustomGrid.EditorMode

  

True when the Editor is ready to modify the value for the current cell.

TCustomGrid.EditorWidthChanged

  

Performs actions needed when the width for a cell Editor has been changed.

TCustomGrid.ColWidths

  

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

DEFCOLWIDTH

  

Default width for columns in a grid control.


Version 3.2 Generated 2024-02-25 Home