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

# TGridColumn.GetDefaultAlignment

Gets the default value for the Alignment property.

## Declaration

Source position: grids.pas line 577

`protected function TGridColumn.GetDefaultAlignment: TAlignment; virtual;`

## Function result

TAlignment instance with the default alignment for the grid column.

## Description

GetDefaultAlignment is a TAlignment function used to get the default value for the Alignment property in the grid column.

GetDefaultAlignment uses the value in ButtonStyle to determine the alignment needed for the grid column instance. When ButtonStyle contains cbsCheckboxColumn or cbsButtonColumn, the alignment is set to taCenter. Otherwise, the alignment is set to taLeftJustify.

GetDefaultAlignment is called when reading the value for the Alignment property, and the value in the property member has not been assigned (contains Nil). It is also called when setting a new value in Alignment, and determines whether the property member needs to be re-allocated for the modified value.

## See also

TGridColumn.Alignment |  | Indicates the alignment for values displayed in the column: left or right aligned, or centered.
TGridColumn.ButtonStyle |  | The style used for a button displayed for cells in the column.