Specifies whether text displays on a single line or multiple lines within a control or object. Available at design time and run time. There are two versions of the syntax.
[Form.]Control.WordWrap [= lExpr] Grid.Column.Header.WordWrap [= lExpr]
Specifies a Logical value that indicates whether text displays on multiple lines in the control or object.
The following table lists values of lExpr for CheckBox, CommandButton, Label, and OptionButton controls.
The following table lists values of lExpr for Header objects in grid columns.
Text displays on a single line and appears truncated if the text does not fit the control. (Default)
Text displays on multiple lines to fit within the control.
Note: When the WordWrap property is True (.T.) for check boxes and option buttons, the PicturePosition property determines the position of images on the controls. For more information, see PicturePosition Property. lExpr Description
Text displays on a single line and appears truncated if text does not fit the header. (Default)
Text displays on multiple lines and wraps to fit the column boundary. However, the text appears truncated if you do not adjust the header height to fit the text.
Tip: To change the height of the header, change the GridВ HeaderHeight property. For more information, see HeaderHeight Property.
For CheckBox, CommandButton, Label, and OptionButton controls, WordWrap specifies whether text specified by the control's Caption property displays on a single line or on multiple lines so they fit the control. For check boxes, command buttons, and option buttons, the text always appears centered vertically in the control. For labels, text appears at the top.
|The control's AutoSize property determines whether the control resizes automatically to fit its contents. To resize the control automatically, set the control's AutoSize property to True (.T.). Otherwise, you might need to adjust the height of the control to accommodate multiple lines of text.|
For check boxes, option buttons, and headers, the Alignment property determines the text alignment. For more information, see Alignment Property.
For column Header objects in grids, WordWrap specifies whether the text specified by the header's Caption property wraps to fit the column boundary.
|The WordWrap property only respects the CHR(10) (carriage return) and CHR(13)+CHR(10) (linefeed and carriage return) characters to manually wrap text.|