Update cookies preferences
Promotic

onExpand - event of the PmfTree object

Description:
The event is triggered when expanding or collapsing the tree item.
Parameters:
ev(Object) Reference to an object that describes information about the event
Parameters:
ev.SrcObject(Object) Pmf object where the event originated.
ev.Item(Object) Tree item (PmfTreeItem object), that has been expanded or collapsed.
ev.Type(Long) Specifies whether the tree item was expanded or collapsed.
0 - Tree item was collapsed.
1 - Tree item was expanded.
Note:
This event is is functional only in JavaScript language.
 
The event is triggered when expanding or collapsing the tree item occurs, for example by the mouse, the keyboard or as a result of calling the methods SetSel, SetExpanded, SetVisible, etc.
 
This event is not triggered if in the expanded item all subitems are removed or if the item itself is removed.
Example:
Creates the PmfTree object (e.g. in the onFormLoad event of the PmgForm object).
The function is registered into the onExpand event.
JavaScriptSelect and copy to clipboard

function onTreeItemExpand(ev)
{
Pm.Debug("PmfTree.onExpand, tree item id = " + ev.Item.Id ", expand type = " + ev.Type);
}

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

oTree.AddEvent("onExpand", "treeitemexpand", onTreeItemExpand);
PROMOTIC 9.0.28 SCADA system documentation MICROSYS, spol. s r.o.

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