Promotic
Login logon

onAction - event of the PmfTree object

Description:
The event is triggered when an important logical action happens over the object.
Parameters:
ev(Object) Reference to an object that describes information about the event
Parameters:
ev.SrcObject(Object) Pmf object where the event originated.
ev.Action(String) Action type.
"main" - left mouse button double-click or on release of the "space" or "Enter" key over the tree.
ev.Item(Object) Tree item (PmfTreeItem object), over which the action was performed.
Note:
This event is is functional only in JavaScript language.
Example:
Script for example in the onFormLoad event of the PmgForm object:
JavaScriptSelect and copy to clipboard

var oForm = pMe.Form;
var oTree = oForm.CreateItem("tree", "id_tree1");
var oRoot = oTree.TreeRoot;
oRoot.CreateItem("item1");
oRoot.CreateItem("item2");
// ... Additional tree settings

// The function is registered into the onAction event.
function onTreeAction(ev)
{
if (ev.Action == "main")
{
Pm.Debug("PmfTree.onAction TreeItemId=" + ev.Item.Id);
}
}
oTree.AddEvent("onAction", "Id_Action", onTreeAction);
PROMOTIC 9.0.32 SCADA system documentation MICROSYS, spol. s r.o.

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