GridLineWidthUnpopulatedproperty
Returns or sets the width, in pixels, of the lines displayed between the unpopulated areas of the grid.
Syntax
PROPERTY GridLineWidthUnpopulated () AS SHORT
PROPERTY GridLineWidthUnpopulated (BYVAL nWidth AS SHORT)
Parameters
| Name | Description | |
|---|---|---|
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 unpopulated areas of the grid — regions where no data, fixed rows, fixed columns, or banded structure is present.
Remarks
In hierarchical layouts, the MSHFlexGrid may contain areas that do not correspond to any data row, fixed row, or band. These “unpopulated” regions appear when:
- the grid is larger than the data it displays
- bands have uneven row counts
- indentation or outline levels leave visual gaps
GridLineWidthUnpopulated controls the thickness of the grid lines drawn in these empty regions, allowing you to visually distinguish them from populated cells.
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.GridLineWidthUnpopulated = 2 ' Sets unpopulated grid lines to be 2 pixels wide grid.GridLineWidth = 1 ' Sets scrollable grid lines to be 1 pixel wide
Reference
- Documented in Windows/Windows GUI/MSHFlexGrid Class.md
- Topic: Microsoft Hierarchical Grid