ColWordWrapOptionHeaderproperty
Controls text wrapping specifically for column header cells.
Syntax
PROPERTY ColWordWrapOptionHeader (BYVAL BandNumber AS LONG, BYVAL BandColIdx AS LONG) AS WordWrapSettings
PROPERTY ColWordWrapOptionHeader (BYVAL BandNumber AS LONG, BYVAL BandColIdx AS LONG, BYVAL opt AS WordWrapSettings)
Parameters
| Name | Description | |
|---|---|---|
BandNumber | The zero-based index of the hierarchical band. | |
BandColIdx | The zero‑based index of the column within that header. A value of –1 applies the setting to all header columns in the band. | |
opt | An integer value or constant that defines how text is displayed: flexWordBreak: Normal word-breaking/wrapping. flexWordBreakEllipsis: Wraps text but appends an ellipsis ("...") if the text is still too long for the available space. |
Description
Returns or sets how text wraps or is truncated within a specific column header.
Remarks
While other properties like ColWordWrapOption target standard data cells, this property ensures header text remains legible in constrained spaces.
It defines whether and how text in the header cells of a specific column should wrap.
It typically requires a column index to specify which header's wrapping behavior to modify.
Like most MSHFlexGrid properties, it is designed to work with hierarchical data structures, ensuring headers at different levels (bands) can have independent wrapping rules.
To see the effects of this property, the grid's global WordWrap property must be set to True.
Setting this property does not automatically resize the header row. You must programmatically increase the RowHeight of the header row (usually Row 0) to reveal the wrapped lines of text.
It is often paired with alignment properties (like ColAlignmentHeader) to ensure the wrapped text is positioned correctly (e.g., centered or top-left) within the expanded header area.
Reference
- Documented in Windows/Windows GUI/MSHFlexGrid Class.md
- Topic: Microsoft Hierarchical Grid