GridLineWidthBandproperty
Returns or sets the width, in pixels, of the lines displayed between bands of the grid.
Syntax
PROPERTY GridLineWidthBand (BYVAL BandNumber AS LONG) AS SHORT
PROPERTY GridLineWidthBand (BYVAL BandNumber AS LONG, BYVAL nWidth AS SHORT)
PROPERTY GridLineWidthBand () AS SHORT
PROPERTY GridLineWidthBand (BYVAL nWidth AS SHORT)
Parameters
| Name | Description | |
|---|---|---|
BandNumber | A zero‑based index identifying the band whose line width is being retrieved or modified. If the band number is omited, band 0 is assumed. | |
nWidth | An integer representing the width in pixels (e.g., 2 for a thicker line). |
Description
Returns or sets the preferred width, in pixels, of the specified band of the grid.
Remarks
The MSHFlexGrid control (Microsoft Hierarchical FlexGrid) is an ActiveX control that displays data in a grid format, particularly supporting hierarchical recordsets (data organized into bands).
The GridLineWidthBand property specifically controls the width (thickness) of the grid lines that separate these hierarchical data bands.
This property is one of several width‑specific settings that let you fine‑tune the appearance of different grid areas:
- GridLineWidth – scrollable populated cells
- GridLineWidthFixed – fixed rows and fixed columns
- GridLineWidthBand – specific band
- GridLineWidthHeader – band header area
- GridLineWidthIndent – indentation area
- GridLineWidthUnpopulated – empty/unpopulated regions
Example
grid.GridLineWidthBand(0) = 2 ' Sets the first band to be 2 pixels wide grid.GridLineWidthBand(1) = 1 ' Sets the second band to be 1 pixel wide
Reference
- Documented in Windows/Windows GUI/MSHFlexGrid Class.md
- Topic: Microsoft Hierarchical Grid