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
oFormItem = 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: PmFormItem.Type.

"string" - Creates object PmFormItemString = Text input
"int" - Creates object PmFormItemInt = Real number input (Integer)
"float" - Creates object PmFormItemFloat = Real number input (Float)
"bool" - Creates object PmFormItemBool = Boolean value input item (Checkbox)
"enum" - Creates object PmFormItemEnum = Select one of multiple items (Combobox)
"button" - Creates object PmFormItemButton = Button
"separ" - Creates object PmFormItemSepar = 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 text ("") can be set.

This value can later be detected by property: PmFormItem.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: PmFormItem.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 PmFormItemInt 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:
© MICROSYS, spol. s r. o.Tavičská 845/21 703 00 Ostrava-Vítkovice