Promotic
WikipediaLinkedInYoutubeTwitterFacebook

CreateItem - method of object PmForm

Description:
Creates a single list item.
Syntax:
Object CreateItem(String sType, [String sId], [String sTitle], [String sProps], [String sPars])
Calling:
oItem = oForm.CreateItem(sType, sId, sTitle, sProps)
Parameters:
sType(String) Pmf object type. Based on this type the corresponding object is created.

This value can later be detected by means of the PmfObject.Type property.

"string" - Creates object PmfString = Text input
"number" - Creates object PmfNumber = Integer or real number input
"bool" - Creates object PmfBool = Boolean value input item (Checkbox)
"enum" - Creates object PmfEnum = Selection of one of multiple items (Combobox)
"button" - Creates object PmfButton = Button
"layout" - Creates object PmfLayout = Area for other Pmf objects
"separ" - Creates object PmfSepar = Separator between configurators
"table" - Creates object PmfTable = Table
sId[optional] (String) Pmf object identifier.

Identifier can be used for example to obtain the Pmf object by the GetItem method or for testing in the oExtra.onChange event.

If the identifier is not defined or is null then it is not possible to refer to this object.

This value can later be detected by means of the PmfObject.Id property.

sTitle[optional] (String) Displayed name of the Pmf object.

The name is by default displayed to the left of the configurator.

If needed, then the system adds "colon" character to the name.

If the name is an empty string then it is not displayed, but its space is allocated (the TitlePos property is unchanged).

If name is not set or is null then it is not displayed and its space is not allocated (simultaneously the the TitlePos property is set to "no").

This value can later be detected or modified by means of the PmfObject.Title property.

sProps[optional] (String) Initial values of properties of the created object. The syntax of this parameter is "PropertyName:Value;...". Entries are in KeyVal format.

For example when creating the PmfNumber object can be entered: "Min:0;Max:100;"

sPars[optional] (String) Parameters of created Pmf object. Define where the object will be created. "parent:$sys;pos:after=xy". Entries are in KeyVal format.
parent:id - Specifies in which PmfLayout object the object will be created. The default value is $main.
pos:before=id - Create the object in front of the object created previously with id identifier.
pos:after=id - Create the object behind the object created previously with id identifier.
pos:first - Insert the object as first.
pos:last (default) - Insert the object as last.
Note:

This method is also functional in Web panels.

See also:

History:
Pm8.03.08: Created
PROMOTIC 9.0.7 SCADA system documentation - MICROSYS, spol. s r.o.

Send page remarkContact responsible person
© MICROSYS, spol. s r. o.Tavičská 845/21 703 00 Ostrava-Vítkovice