ISDBTree::AddNode: Difference between revisions
		
		
		
		Jump to navigation
		Jump to search
		
No edit summary  | 
				mNo edit summary  | 
				||
| (One intermediate revision by one other user not shown) | |||
| Line 4: | Line 4: | ||
{{MethodParameters    | {{MethodParameters    | ||
  |ParentNode |ISDBTreeNode |The node where the new node   |   |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  |   |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.}}  |   |NodePosition |EnumTreeNodePos |Relative location of AddNode to ParentNode: 0..before, 1..after, 2.. the first child or 3..the last child.}}  | ||
| Line 14: | Line 14: | ||
===Example code===                       | ===Example code===                       | ||
<source lang="vb">  | <source lang="vb">  | ||
Set Node =   | Set Node = SDB.MainTree.CreateNode  | ||
Node.Caption = "Reversed Now Playing"  | Node.Caption = "Reversed Now Playing"  | ||
Node.IconIndex = 40  | Node.IconIndex = 40  | ||
| Line 20: | Line 20: | ||
Node.OnFillTracksFunct = "FillNPTracks"  | Node.OnFillTracksFunct = "FillNPTracks"  | ||
SDB.MainTree.AddNode SDB.MainTree.Node_NowPlaying, Node, 3    ' Add as the last child of NowPlaying  | |||
</source>  | </source>  | ||
Latest revision as of 10:42, 30 September 2007
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