Sign in Join
FPDoc Onlineexperiment

TGridColumn.MinSize property

Member of TGridColumnpublishedIn unit Grids

The minimum size for the column in pixels.

Declaration

pascal
property MinSize: Integer read GetMinSize write SetMinSize stored IsMinSizeStored;

Description

MinSize and MaxSize are used to determine the smallest and largest sizes for the column when it is resized horizontally. This can occur when the border on the column header is dragged on the Grid control (requires column resizing to be enabled in the Options for the Grid). It can also occur when the AutoFillColumns property in the Grid is enabled and SizePriority is set to a non-zero value.

If MinSize has not been assigned, GetDefaultMinSize is called to get the value for the property. Assigning a new value for the property causes ColumnChanged to be called to notify the column collection when the collection item is updated. WidthChanged is set to False when the collection has been notified of the updated value.

Please note that MinSize and MaxSize are not enforced during manual column resizing (when enabled) if all of its columns have SizePriority set to 0. The last column will still be automatically sized to fill the available space, but the minimum and maximum widths for the column are not applied.

Use Width to set the default size of the column in pixels.

See also

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