Help Center

ColWordWrapOptionHeaderproperty

Controls text wrapping specifically for column header cells.

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 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

NameDescription
BandNumberThe zero-based index of the hierarchical band.
BandColIdxThe zero‑based index of the column within that header. A value of –1 applies the setting to all header columns in the band.
optAn 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