WordWrap

This property returns and sets a value that indicates whether a Label control with its AutoSize property set to True expands vertically or horizontally to fit the text specified in its Caption property.

Syntax

object.WordWrap [= Boolean]

Parameters

object
Object expression that evaluates to a Label control.
Boolean
Boolean expression that specifies whether the Label expands to fit the text. Following are the settings for Boolean:
True
The text wraps. The Label control expands or contracts vertically to fit the text and the size of the font. The horizontal size does not change.
False (default)
The text does not wrap. The Label control expands or contracts horizontally to fit the length of the text and vertically to fit the size of the font and the number of lines.

Remarks

Use this property to determine how a Label control displays its contents. For example, a graph that changes dynamically might have a Label containing text that also changes. To maintain a constant horizontal size for the Label and to enable increasing or decreasing text, set the WordWrap and AutoSize properties to True.

If you want a Label control to expand horizontally only, set WordWrap to False. If you do not want the Label to change size, set AutoSize to False.

If AutoSize is set to False, the text always wraps, regardless of the size of the Label control or the setting of the WordWrap property. This may obscure some text because the Label does not expand in any direction.