wordWrap

Type: Boolean

Availability: Read or write at any time (labels, frames, or status lines) or at run time only (tables)

The wordWrap property specifies whether text displayed in a caption for a Label, Frame, or StatusLine control advances to the next line of the control when the current line is filled.

The wrapping is performed based on complete words.

The settings of the wordWrap property are listed in the following table.

Setting Description
true The text wraps when the text overflows a line. The horizontal size does not change.
false The text is output on a single line and may overflow the control.

A Label control can be automatically sized to fit the text by setting the autoSize property to true. The setting of the wordWrap property then determines whether the resize is performed horizontally or vertically.

For Table controls, the wordWrap property specifies whether the text of a cell is displayed using word wrap when the width of the cell is less than the length of the text. Accessing this property on a table is affected by the current value of the Table class accessMode property. The wordWrap property can also be accessed by the accessSheet, accessRow, accessColumn, and accessCell methods.

The default value for any new Table control that is added is false. When the value of the wordWrap property is set to false for a table, the text of a cell is displayed as a single line unless the text contains carriage return characters, which start a new line. In addition, when the inputType property of a cell has a value of InputType_TextBox, that text box is displayed in the cell at data entry time with the scrollHorizontal property set to true, indicating that the text scrolls horizontally as required to access all of the text.

If the wordWrap property for a table is set to true, the text of a cell is displayed using word wrap so that if the text is wider than the cell, a new line is started when the text exceeds the cell width, breaking on word boundaries.

In addition, when the inputType property of a cell is set to InputType_TextBox, that text box is displayed in the cell at data entry time with the scrollHorizontal property set to false, indicating that the text also uses word wrap during entry. If word wrapping occurs, the height of the cell may need adjusting to fully display the text.

When the Form class generateHTML method is called to generate an HTML string or HTML is automatically generated for forms in a Web-enabled application, the HTML is generated without word wrapping when the wordWrap property is set to false. Set this property to true if you want an HTML string in a table cell generated with word wrapping.

When the wordWrap property for a Table is set to true, the effect of setting the autoSize property is as follows.

For details about displaying an indication when there is insufficient room to show all text of a cell, see the Table class partialTextIndication property.