Help Center

FontWidthFixedproperty

Returns or sets the width, in points, of the font to be used for text displayed withinthe grid's fixed area.

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 FontWidthFixed () AS SINGLE
PROPERTY FontWidthFixed (BYVAL nWidth AS SINGLE)

Parameters

NameDescription
nWidthThe width of the font, in points. A value of 0 typically resets the font to its standard natural width for the current point size.

Description

Returns or sets the width, in points, of the font to be used for all fixed rows and fixed columns (the non-scrolling headers).

Remarks

Unlike FontSize, which scales the whole character, FontWidthFixed specifically controls the horizontal stretch or compression of characters. Increasing this value makes header text appear wider without making it taller.

If you increase the FontWidthFixed value significantly, you must manually adjust the ColWidth of your fixed columns. The MSHFlexGrid does not automatically expand the column width to prevent wider characters from being clipped.

Example

grid.FixedRows = 1 ' Compress the header font slightly to fit more text grid.FontWidthFixed = 6 ' For contrast, keep data cells at standard width grid.FontWidth = 0

Reference