Promotic
Login logon

Multiline - property of the PmfString object

Description:
Enable/disable displaying the text on more than one line.
Syntax:
Long Multiline
Values:
0 (default) - Single-row text input box.
The text will always be displayed on a single row, even if it contains 'new line' ("\n") characters.
1 - Multiline text input box.
The Selection presets ValueHeightIni=5.
In this input box a new line can be entered by the Enter key.
Text wrapping is controlled solely by newline characters. To display the text across multiple lines, the text must contain character 'new line' ("\n").
If the text on a single line is longer than the width of the input window, a horizontal scrollbar will appear in the input window.
2 - Multiline text input box.
The selection presets ValueHeightIni=5.
In this input box a new line can be entered by the Enter key.
Text wrapping is determined by newline characters ("\n") and the length of the text on the line. If the text on a single line is longer than the width of the input window, then the text is automatically wrapped at the nearest whole-word boundary, and the text continues on the next line. A horizontal scroll bar never appears in the input window.
Note:
Property access for read and write.
 
It is possible to write into this property only if the PmForm window has not been opened yet.
This property is also functional in Web panels.
See also:
- PmfString.Subtype (property)
- PmgString.Multiline (property)
- PmfTable.Multiline (property)
Example1:
JavaScriptSelect and copy to clipboard

var oString = oForm.CreateItem("string", "idStr1", "Title", "Multiline:1;");
var nMultiline = oString.Multiline;   // Reading from the property
oString.Multiline = 1;   // Writing into the property
Example2:
Creates a multiline text:
JavaScriptSelect and copy to clipboard

var oItem = oForm.CreateItem("string", "addr", "Address", "Multiline:1;");
oItem.Value = "Whitestreet 145\nNew York\nUSA";   // Character "\n" creates new rows.
Example3:
For multiline text over the whole area (i.e. no name displayed) see Example2.
Example4:
For multi-row static text note see Example2.

History:
Pm9.00.35: New value of the Multiline property: 2.
Pm8.03.15: Created
PROMOTIC 9.0.34 SCADA system documentation MICROSYS, spol. s r.o.

Send page remark Contact responsible person
© MICROSYS, spol. s r.o.Update cookies preferences