Object PmfButton

This object represents one form item of the type:
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:
AddEvent()Registers a function into the specified event
BodyFontFont of the Body area of the Pmf object
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
FormReturns PmForm object
IdPmf object identifier
ParentReturns reference to the parent Pmf object
PrivateDataPrivate value of the object
RemoveEvent()Unregisters the function in the specified event
TitleDisplayed name of the Pmf object
TitleFontFont of the Title area 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 oSystem.ChangeType = "push" flag.
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.27 SCADA system documentation MICROSYS, spol. s r.o.

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