WordWrap Property

Applies To   See Also

Specifies whether a Label control expands vertically or horizontally to fit the text specified with its Caption property when the control is resized. Available at design time and run time.

Syntax

[Form.]Label.WordWrap[ = lExpr]

Settings

lExpr

The settings for the WordWrap property are as follows:

Setting Description
True (.T.) The text wraps and the label expands or contracts vertically to fit the text and the size of the font. The horizontal size does not change.
False (.F.) (Default) The text does not wrap and the label 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. The vertical size does not change.

Remarks

Use this property to determine how a label 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 allow for increasing or decreasing text, you would set the WordWrap property to true (.T.).

If you want a label to expand only horizontally, set WordWrap to false (.F.). If you do not want the label to change size, set AutoSize to false (.F.).

Note   If the WordWrap property is set to true (.T.), the AutoSize property is ignored.