Promotic
WikipediaLinkedInYoutubeTwitterFacebook

Object PmfButton

Description:
This object represents one form item of the type: "Button".
Properties and methods of this object:
Value Text displayed inside the button
ValueHorzAlign The way of horizontal text alignment
Properties and methods that are common to all objects of the PmfObject type:
AddEvent Registers a function into selected event
BodyHeightIni Initial body height
BodyHeightMode Changing body height
BodyWidthIni Initial body width
BodyWidthMode Changing body width
Enabled Enable/disable editing of values
Id Pmf object identifier
PrivateData Reading or writing private value into the object
RemoveEvent Deregisters the function in the specified event
Title Displayed name of the Pmf object
TitlePos Position of displayed Pmf object name
Type Pmf object type
Visible Sets the visibility/invisibility of Pmf object
Events:
onAction Is triggered when an important logical action happens over the object
onFocus Is triggered if the Pmf object gets or loses focus
Note:
- The object can be created by the 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".
Example1:
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", onTest);

History:
Pm8.03.08: Created
PROMOTIC 9.0.13 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