CreateItem - method of object PmForm

Creates a single list item.
CreateItem(sType As String, sId As String, sTitle As String, [sProps As String]) As Object
oItem = oForm.CreateItem(sType, sId, sTitle, sProps)
sType(String) Item type. Based on this type the corresponding object is created.

This value can later be detected by property: PmfObject.Type.

"string" - Creates object PmfString = Text input
"int" - Creates object PmfInt = Real number input (Integer)
"float" - Creates object PmfFloat = Real number input (Float)
"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
"separ" - Creates object PmfSepar = Separator between configurators
sId(String) Item identifier.

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

If the identifier has no relevance, then empty string ("") can be set.

This value can later be detected by property: PmfObject.Id.

sTitle(String) Displayed item name.

The name is by default displayed to the left of the configurator. If needed, then the system adds "colon" character to the name.

This value can later be detected or modified by property: PmfObject.Title.

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

For example when creating object PmfInt it is possible to define: "Min:0;Max:100;"


It is possible to call this method only if the PmForm window has not been opened yet.

The method can also be called in the graphic item events for Web panels.

See also:
PROMOTIC 8.3.30 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