FontWidthFixedproperty
Returns or sets the width, in points, of the font to be used for text displayed withinthe grid's fixed area.
Syntax
PROPERTY FontWidthFixed () AS SINGLE
PROPERTY FontWidthFixed (BYVAL nWidth AS SINGLE)
Parameters
| Name | Description | |
|---|---|---|
nWidth | The 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
- Documented in Windows/Windows GUI/MSHFlexGrid Class.md
- Topic: Microsoft Hierarchical Grid