Object PmForm (Form)

Object represents a form for entering data.
Properties and methods:
AddEvent()Registers a function into selected event
BgColorForm window background color
BodyFontFont of the Body area of the Pmf object
ClientTypeReturns a value that represents Pmf object viewing type
Close()Close form viewer
CreateItem()Creates a single form item
GetItem()Returns Pmf object (i.e. existing form item)
GetItems()Returns an array of Pmf objects.
PrivateDataPrivate value of the PmForm object
RemoveEvent()Unregisters the function in the specified event
RemoveItem()Removes Pmf object (i.e. existing form item)
RemoveItems()Removes items of the Pmf object
SysButtonsSystem buttons selection
SysLayoutPosPosition of the system area $sys
TitleDisplayed form name in the window title bar
TitleFontFont of the Title area of the Pmf object
List of Pmf subobjects:
PmfBoolBoolean value input item (Checkbox)
PmfEnumSelection of one of multiple items (Combobox)
PmfLayoutArea for other Pmf objects
PmfNumberInteger or real number input
PmfObjectFormal object - parent of all form items
PmfSeparSeparator between configurators
PmfStringText input
onCloseIs triggered on closing of the PmForm object
onOpenIs triggered on opening of the PmForm object
- This object is functional also in Web panels.
- The object can be used in both VBScript and JavaScript languages.
- The PmForm object is created automatically:
- or in the PmgForm object.

The PmForm object can be used to create a data input window (form) dynamically (i.e. in the script). Each "input value" represents one Pmf object, i.e. one item of the form.
The form can be created also by the PmaPanel object, but the PmForm object allows to create such form dynamically and more simply, because the form items (Pmf objects) are positioned and resized automatically as needed.
In the PmaPanel object it is also possible to use the PmForm object by means of the PmgForm object.

How to use the PmForm object:
2) Create the PmgForm object in the panel (in the PmaPanel object) aside other Pmg objects.
3) Create a single the PmgForm object in the panel (in the PmaPanel object). Stretch it to the whole panel area in the PmgRoot.onViewerResize event.
This procedure is similar to the procedure 1), but it is enveloped into the PmaPanel object.
This may be handy because the script filling the PmForm object is located in a single global location (in the PmaPanel object) and therefore it can be opened from any other panel.

Main areas for placing the Pmf objects:
The PmForm object automatically creates several system areas (of PmfLayout objects).
All these objects have an identifier beginning with the $ character.
$root: Root of all form areas. It is a parent of the areas $main and $sys. The preset location is "Subtype:horz".
$main: Main area that is default for creating all Pmf objects by the PmForm.CreateItem method.
- This PmfLayout object is preset to have "Subtype:vert" so all objects created in it will be placed vertically (i.e. one uder the other).
$sys: System area where the application designer can place Pmf objects.
- This area is displayed only if there are some Pmf objects present.
- If the area is displayed then the preset placement is to the right from the area $main. The placement can be changed by means of the PmForm.SysLayoutPos property.
- This PmfLayout object is preset to have "Subtype:vert".

Pm9.00.05: PmfObject.AddEvent new method for registration of a function that is called when the event in the object is triggered.
Pm9.00.04: New subobject PmfTable that can be used to assign a table of values into the form.
Pm8.03.17: Fixed bug: System buttons had only English texts.
- In each PmfObject object there are new properties TitlePos, BodyWidthMode, BodyWidthIni, BodyHeightMode, BodyHeightIni.
These properties can be used for better positioning of configurators.
- In the PmfString object there are new properties Multiline and Subtype. It is now possible to create multi-row input box, static notes, etc.
- In the PmfSepar object there is a new property Subtype. It is now possible to insert empty rows between the configurators.
- New Pmf object type - separator, i.e. PmfSepar object.
- Close new method and new properties BgColor, SysButtons.
Pm8.03.08: Created
PROMOTIC 9.0.25 SCADA system documentation MICROSYS, spol. s r.o.

Send page remarkContact responsible person
© MICROSYS, spol. s r. o.