Help Center

FontBandproperty

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

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 FontBand (BYVAL BandNumber AS LONG) AS IFont PTR
PROPERTY FontBand (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 for data cells within a specific hierarchical band.

Remarks

Since the MSHFlexGrid is designed to display parent-child relationships (hierarchies), this property allows you to visually distinguish different levels of data by applying unique fonts to each level.

This property is index-based, where the index corresponds to the band level (Band 0 is the top-level or primary data).

Because it returns a Font object, you can modify specific attributes:

Examples

grid.FontBand(1)->Name = "Verdana" grid.FontBand(1)->Bold = True grid.FontBand(1)->Size = 9

' Set the primary data (Band 0) to standard font grid.FontBand(0).Name = "Arial" grid.FontBand(0).Size = 10

' Set the child data (Band 1) to be smaller and italicized grid.FontBand(1).Name = "Arial" grid.FontBand(1).Size = 8 grid.FontBand(1).Italic = True

Reference