FontWidthBandproperty
Returns or sets the width, in points, of the font to be used for text displayed withinthe grid's band area.
Syntax
PROPERTY FontWidthBand (BYVAL BandNumber AS LONG) AS SINGLE
PROPERTY FontWidthBand (BYVAL BandNumber AS LONG, BYVAL nWidth AS SINGLE)
Parameters
| Name | Description | |
|---|---|---|
BandNumber | The index of the hierarchical band (e.g., 0 for the parent, 1 for the first child). | |
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 of the font for the data cells within a specific hierarchical band.
Remarks
While standard font properties apply to the entire grid, FontWidthBand provides granular control over the horizontal scale of characters for specific nested levels in hierarchical data displays.
It is most commonly used in legacy to make nested child records appear more condensed or visually distinct from their parent records.
Like other font properties, changing the FontWidthBand does not automatically resize columns. If the font width is increased, you must manually adjust the ColWidth for that band to avoid text clipping.
This property is only effective when the grid is bound to a hierarchical data source (e.g., an ADO recordset created via the SHAPE command). If the grid is used in unbound mode, typically only Band 0 exists.
Reference
- Documented in Windows/Windows GUI/MSHFlexGrid Class.md
- Topic: Microsoft Hierarchical Grid