Promotic
Login logon

onSelChange - event of the PmfTree object

Description:
The event is triggered when tree item selection changes.
Parameters:
ev(Object) Reference to an object that describes information about the event
Parameters:
ev.SrcObject(Object) Pmf object where the event originated.
Note:
This event is is functional only in JavaScript language.
The event is triggered when the tree item selection changes for example by mouse, keyboard or by calling the methods SetSel, SetExpanded, RemoveItem, etc.
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 onSelChange event.
function onTreeSelChange(ev)
{
Pm.Debug("PmfTree.onSelChange TreeItemId=" + ev.SrcObject.TreeRoot.GetSel(0).Id);
}
oTree.AddEvent("onSelChange", "Id_Change", onTreeSelChange);
PROMOTIC 9.0.34 SCADA system documentation MICROSYS, spol. s r.o.

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