Searches for and returns the specified node object in the TreeView control.
App.ActiveForm.TreeViewObject.Nodes.FindByKey(Key)
Newlook Smartclient only.
You can use this method to return an object reference that can be used with the EnsureVisible method. This method is useful for maintaining references to Nodes from other controls or data. For example the key value of the Node could be stored within the ItemData array of a ListBox control so that it may be latter be used to locate an associated Node in a given TreeView.
Key - (String, Required)
A string which uniquely identifies a Node in the Nodes collection. This string can be optionally assigned to a node when created using the Add method.
The FindByKey method returns the Node object that has the same Key property as that specified. If the node is not found the return value will be null.
The following example will store the node with the same key as that specified in the variable vNodeKey.
function GetNode()
{
//Save the specified node in a global Newlook variable.
vSavedNode = App.ActiveForm.tvOrgChart.Nodes.FindByKey(vNodeKey);
App.SetValue("SavedNode", vSavedNode);
App.SetValue("SavedNodeText", vSavedNode.Text)
}
TreeView control | Node object | LastClickedNode property | GetFirstVisible method