property Node.NodeCount as Long
Retrieves the number of child nodes.

TypeDescription
Long A long expression that indicates the number of child nodes.

Use the NodeCount property to determine the number of child nodes. Use the FirstNode property to determine the first child node. Use the NextNode property to determine the next sibling node. Use the Position property to change the node's position. Use the LastNode property to determine the last child node. Use the Nodes property to access the nodes collection. Use the Add method to add a child node. Use the Item property to retrieve a node by its key.

The following VB sample enumerates recursively all the child nodes: 

Private Sub enumRec(ByVal n As EXORGCHARTLibCtl.Node)
    Dim c As EXORGCHARTLibCtl.Node
    Set c = n.FirstNode
    While Not c Is Nothing
        Debug.Print c.Caption
        enumRec c
        Set c = c.NextNode
    Wend
End Sub

The following C++ sample enumerates recursively all the child nodes: 

void enumRec( CNode* pNode )
{
	if ( pNode != NULL )
	{
		CNode child = pNode->GetFirstNode();
		while ( child.m_lpDispatch != NULL )
		{
			OutputDebugString( child.GetCaption() );
			OutputDebugString( "\r\n" );
			enumRec( &child );
			child = child.GetNextNode();
		}
	}
}

The following VB.NET sample enumerates recursively all the child nodes: 

Private Sub enumRec(ByVal n As EXORGCHARTLib.Node)
    Dim c As EXORGCHARTLib.Node = n.FirstNode
    While Not c Is Nothing
        Debug.Print(c.Caption)
        enumRec(c)
        c = c.NextNode
    End While
End Sub

The following C# sample enumerates recursively all the child nodes: 

private void enumRec(EXORGCHARTLib.Node node)
{
	EXORGCHARTLib.Node child = node.FirstNode;
	while (child != null)
	{
		System.Diagnostics.Debug.WriteLine(child.Caption);
		enumRec(child);
		child = child.NextNode;
	}
}

The following VFP sample enumerates recursively all the child nodes: 

LPARAMETERS node

local child
child = node.FirstNode
do while ( !isnull( child ) )
	wait window nowait child.Caption
	thisform.enumrec( child )
	child = child.NextNode
enddo