Question
How in VB6 do you iterate through the nodes/cells of the tree view located on the left.
I cant seem to find any structure which says something like:
For each node in treeviewnodes
Node.cell0 = “”
Node.cell1 = “”
Node.cell2 = “”
Next
Answer
Like this:
Private Sub CommandIterate_Click()< ?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />
Dim activity As IphDataEntity_Tree
Set activity = Nothing
IterateActivity phGantX1.RootDataEntitiesTree, activity
End Sub
Public Sub IterateActivity(aphDataList As IphDataList, aOwner As IphDataEntity_Tree)
Dim activity As IphDataEntity_Tree2
For i = 0 To aphDataList.Count – 1
Set activity = aphDataList.Items(i)
For ii = 0 To phGantX1.GridColumnCount – 1
Dim s As String
s = phGantX1.GetGridCellString(ii, activity.GridRowIndex)
Next
IterateActivity activity.SubDataList, activity ‘ traverse owned nodes
Next
End Sub