ISDBTree::NextSiblingNode: Difference between revisions

From MediaMonkey Wiki
Jump to navigation Jump to search
No edit summary
 
m (Add behaviour when Node is last node, with example code)
 
Line 8: Line 8:
===Property description===
===Property description===


Returns the next node on the same tree level.
Returns the next node on the same tree level. Returns Nothing if Node is the last one at that hierarchy level.
 
===Example Code===
 
This example code can be used to do an operation on every node under a master node.
 
<source lang="vb">
If (MasterNode.HasChildren) Then
Dim ChildNode
Set ChildNode = Tree.FirstChildNode(MasterNode)
While Not (ChildNode Is Nothing)
' Do things with ChildNode
Set ChildNode = Tree.NextSiblingNode(ChildNode)
Wend
End If
</source>
 


[[Category:Scripting|{{PAGENAME}}]]
[[Category:Scripting|{{PAGENAME}}]]

Latest revision as of 12:23, 27 January 2008

CoClass SDBTree, Interface ISDBTree

Property Get NextSiblingNode(Node As SDBTreeNode) As SDBTreeNode


Parameters

Name Type Description
Node SDBTreeNode


Property description

Returns the next node on the same tree level. Returns Nothing if Node is the last one at that hierarchy level.

Example Code

This example code can be used to do an operation on every node under a master node.

If (MasterNode.HasChildren) Then
	Dim ChildNode
	Set ChildNode = Tree.FirstChildNode(MasterNode)
	While Not (ChildNode Is Nothing)
		' Do things with ChildNode
		Set ChildNode = Tree.NextSiblingNode(ChildNode)
	Wend
End If