Object PmfButton

This object represents one form item of the type: "Button".
Properties and methods of this object:
ValueText displayed inside the button
ValueHorzAlignThe way of horizontal text alignment
Properties and methods that are common to all objects of the PmfObject type:
AddEventRegisters a function into selected event
BodyHeightIniInitial height of the Body area
BodyHeightModeThe way of changing the Body area height
BodyWidthIniInitial width of the Body area
BodyWidthModeThe way of changing the Body area width
EnabledEnable/disable editing of values
IdPmf object identifier
PrivateDataPrivate value of the object
RemoveEventDeregisters the function in the specified event
TitleDisplayed name of the Pmf object
TitlePosPosition of the Title area of the Pmf object
TypePmf object type
VisibleReturns or sets the visibility/invisibility of Pmf object
onActionIs triggered when an important logical action happens over the object
onFocusIs triggered if the Pmf object gets or loses focus
- The object can be created by method PmForm.CreateItem("button", ...).
- This object is functional also in Web panels.

If the oExtra.onChange entry is set when the window is being opened and if the user presses this button, then the user event is triggered with flag oSystem.ChangeType = "push".
Script creates one form item. It is presumed that the oForm object already exists.
JavaScriptSelect and copy to clipboard

function onTest(ev)
if (ev.Action == "main")
Pm.Debug("Click UP");
// . . .

var oBtn = oForm.CreateItem("button", "id_butt1");
oBtn.Value = "Button";
oBtn.AddEvent("onAction", "id_butt1", onTest);

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

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