Help Center

ColWordWrapOptionproperty

Controls how text wraps and behaves when it exceeds a cell's width.

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 ColWordWrapOption (BYVAL Index AS LONG) AS WordWrapSettings
PROPERTY ColWordWrapOption (BYVAL Index AS LONG, BYVAL opt AS WordWrapSettings)

Parameters

NameDescription
IndexThe zero-based column index.
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 set how text wraps or is truncated within a specific column. Unlike the global WordWrap property, this provides per‑column control over wrapping behavior.

Remarks

Setting this property to enable wrapping does not automatically adjust the row height. You must manually set the RowHeight property for the wrapped text to be visible.

For standard word wrapping to occur, the text must contain spaces; otherwise, the control may simply truncate the string or require manual row height adjustments.

Examples

' Enable global word wrap first grid.WordWrap = True

' Set specific option for Column 0 grid.ColWordWrapOption(0) = flexWordBreakEllipsis

' Manually increase row height to see the wrapped content grid.RowHeight(1) = 1000

To enable wrapping with an ellipsis for the first column:

Reference