ISDBTree::AddNode

From MediaMonkey Wiki
Jump to navigation Jump to search

CoClass SDBTree, Interface ISDBTree

Sub AddNode(ParentNode As ISDBTreeNode, AddNode As ISDBTreeNode, NodePosition As EnumTreeNodePos)


Parameters

Name Type Description
ParentNode ISDBTreeNode The node where the new node is added. Can be one of Node_xxx properties or some previously created node.
AddNode ISDBTreeNode The node to be added.
NodePosition EnumTreeNodePos Relative location of AddNode to ParentNode: 0..before, 1..after, 2.. the first child or 3..the last child.


Method description

Adds AddNode as a child of ParentNode.

Example code

Set Node = SDB.MainTree.CreateNode
Node.Caption = "Reversed Now Playing"
Node.IconIndex = 40
Node.UseScript = Script.ScriptPath
Node.OnFillTracksFunct = "FillNPTracks"

SDB.MainTree.AddNode SDB.MainTree.Node_NowPlaying, Node, 3    ' Add as the last child of NowPlaying