Sign in Join
FPDoc Onlineexperiment

TGridColumn.Width property

Member of TGridColumnpublishedIn unit Grids

The display width in pixels for the column on its Grid control.

Declaration

pascal
property Width: Integer read GetWidth write SetWidth stored IsWidthStored;

Description

Width is an Integer property with the display width for the column in pixels. Its value is used when the column has its Visible property set to True. Otherwise, the property value is 0.

Width can be assigned at design-time using the object inspector in the IDE, or at run-time in program code.

If a value has not been assigned for the property, the DefaultColWidth property from the Grid control is used as the property value.

Width is updated at run-time when the column is resized on the Grid control. This can occur when the border on the fixed header is dragged (when column resizing is enabled in the Options for Grid control). It may also occur when AutoFillColumns is enabled for Grid control.

Use MinSize and MaxSize to specify the smallest and largest widths for the column when SizePriority has a non-zero value.

See also

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