JavaScript Editor js editor     Web development 



Main Page

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]

Return Value

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.

lExpr Description

False (.F.)

Text displays on a single line and appears truncated if the text does not fit the control. (Default)

True (.T.)

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.

The following table lists values of lExpr for Header objects in grid columns.

lExpr Description

False (.F.)

Text displays on a single line and appears truncated if text does not fit the header. (Default)

True (.T.)

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.

Remarks

Applies To: CheckBox | CommandButton | Header | Label | OptionButton

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.

Tip:
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.

Note:
The WordWrap property only respects the CHR(10) (carriage return) and CHR(13)+CHR(10) (linefeed and carriage return) characters to manually wrap text.

See Also



JavaScript Editor js editor     Web development