Type | Description | |||
Index as Variant | A string expression that specifies the key of the node, a long expression that indicates the index of the node, a Node object that specifies the node being accessed. | |||
Node | A Node object being accessed. |
Use the Item property to access the node by key or by its index. Use the Count property to count the nodes in the collection. Use the Index property to get the index of the node. Use the Key property to specify the key of the node. Use the FirstNode property to retrieve the first child node. Use the NextNode property to determine the next sibling node. Use the NodeCount property to get the number of child nodes. Use the Position property to change the node's position.
The following VB sample enumerates the nodes in the control:
Dim i As Long With ChartView1.Nodes For i = 0 To .Count - 1 Dim n As EXORGCHARTLibCtl.Node Set n = .Item(i) Debug.Print n.Caption Next End With
The following VB sample enumerates the nodes in the control:
Dim n As EXORGCHARTLibCtl.Node For Each n In ChartView1.Nodes Debug.Print n.Caption Next
The following C++ sample enumerates the nodes in the control:
#include "nodes.h" CNodes nodes = m_chartview.GetNodes(); for ( long i = 0; i < nodes.GetCount(); i++ ) { CNode node = nodes.GetItem( COleVariant( i ) ); OutputDebugString( node.GetCaption() ); }
The following VB.NET sample enumerates the nodes in the control:
Dim i As Integer With AxChartView1.Nodes For i = 0 To .Count - 1 Dim n As EXORGCHARTLib.Node = .Item(i) Debug.WriteLine(n.Caption) Next End With
The following VB.NET sample enumerates the nodes in the control:
Dim n As EXORGCHARTLib.Node For Each n In AxChartView1.Nodes Debug.WriteLine(n.Caption) Next
The following C# sample enumerates the nodes in the control:
for (int i = 0; i < axChartView1.Nodes.Count; i++) System.Diagnostics.Debug.WriteLine(axChartView1.Nodes[i].Caption);
The following VFP sample enumerates the nodes in the control:
local i With thisform.ChartView1.Nodes For i = 0 To .Count - 1 local n n = .Item(i) wait window nowait n.Caption Next EndWith