Promotic
Login logon

Subtype - property of the PmfString object

Description:
Text inputbox type.
Syntax:
String Subtype
Values:
simple (default) - Simple standard single-row text inputbox.
static - Non-editable static text. It is used e.g. as note, description, report etc. For this purpose it is often handy to set "TitlePos:no;".
password - The text is displayed as a password, i.e. * character (asterisk) is displayed instead of the entered character.
Color - The color selector will be displayed. The value RGB String (represents a color) is written in the form "#RRGGBB".
To the right of the color selector, a color button will be displayed with a preview of the specified color. After pressing the button, the color selection window will appear.
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.Multiline (property)
Example1:
JavaScriptSelect and copy to clipboard

var oString = oForm.CreateItem("string", "idStr1", "Title", "Subtype:static;");
var sSubtype = oString.Subtype;   // Reading from the property
oString.Subtype = "static";   // Writing into the property
Example2:
Creates multi-row static note:
JavaScriptSelect and copy to clipboard

var oItem = oForm.CreateItem("string", "note1", "", "Subtype:static;TitlePos:no;Multiline:1;");
oItem.Value = "Note 1\nNote 2\nNote 3";   // Character "\n" creates new rows.
Example3:
Creates a color selector with color selection button:
JavaScriptSelect and copy to clipboard

var oColor = oForm.CreateItem("string", "idClr", "Color", "Subtype:Color;");
oColor.Value = "#ff0000";

History:
Pm9.00.32: New value of the Subtype property: "Color".
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