Help Center

FixedAlignmentproperty

Returns or sets the alignment of data in the fixed cells of a column in an MSHFlexGrid.

Windowspropertydoc-orphan
No implementation located. This member is documented, but the source scan found no matching declaration. It is likely declared in a header this scan does not resolve, or provided by a macro.

Syntax

PROPERTY FixedAlignment (BYVAL Index AS LONG) AS SHORT
PROPERTY FixedAlignment (BYVAL Index AS LONG, BYVAL alignment AS SHORT)

Parameters

NameDescription
IndexThe zero-based index of the column to be formatted.
alignmentAn integer or constant that specifies both the horizontal and vertical alignment.

Description

Returns or sets the alignment of data in the fixed cells of a column in an MSHFlexGrid. Allows you to align column headers independently of the data in the scrollable cells.

The settings for FixedAlignment are the same as those used for ColAlignment:

Remarks

While the global ColAlignment property typically affects an entire column—including its headers—FixedAlignment explicitly overrides that setting for the cells in the fixed rows (headers) of that column.

It is commonly used when you want a column's data to be right-aligned (for numbers) but its header to be centered or left-aligned.

Example

' Set the data area of the second column (Index 1) to right-center grid.ColAlignment(1) = flexAlignRightCenter

' Override only the header (Fixed Row) of the same column to center-center grid.FixedAlignment(1) = flexAlignCenterCenter

Reference