Help Center

FontHeaderproperty

Returns or sets the font of the text in the header.

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 FontHeader (BYVAL BandNumber AS LONG) AS IFont PTR
PROPERTY FontHeader (BYVAL BandNumber AS LONG, BYVAL pFont AS IFont PTR)

Parameters

NameDescription
pFontA pointer to an IFont object.

Description

Returns or sets a Font object used specifically for the column headers of a particular hierarchical band.

Remarks

This property allows for level-specific font customization in hierarchical data displays (e.g., distinguishing parent headers from child headers).

It affects only the header cells for the specified band index (starting at 0 for the top-level band).

Because FontHeader returns a standard Font object, you can modify its specific attributes directly in code: This property is only relevant when the grid is bound to a Hierarchical Recordset (using the SHAPE command). If the grid is used in a standard "flat" mode, only Band 0 exists.

In modern maintenance of legacy apps, FontHeader is often used to make nested child headers appear in a smaller or italicized font to improve visual clarity of the data hierarchy.

Note that changing font attributes via FontHeader does not automatically resize the row or column; you may need to manually update RowHeight or ColWidth to prevent text clipping.

Example

grid.FontHeader(0)->Name = "Arial" grid.FontHeader(0)->Size = 10 grid.FontHeader(0)->Bold = True

Reference