WordWrap Property
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.
[Form.]Label.WordWrap[ = lExpr]
-or-
Specifies whether the text in a grid column header wraps at the column boundary. Available at design time and run time.
Grid.Column.Header.WordWrap[ = lExpr]
Property Values
lExpr
The settings for the WordWrap property in labels 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. The settings for the WordWrap property in grid column headers are as follows:
Setting Description True (.T.) The text wraps but the grid column header does not expand to fit the text and the size of the font. To change the height of the header, use the Grid.HeaderHeight Property. False (.F.) (Default) The text does not wrap.
Note Text alignment in grid header is determined by the value of the Header Alignment property. Text is justified and centered for values of 2 - Middle Center, 6 - Top Center, and 9 - Bottom Center.
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.).