This function is specific for a TreeView control. It will return a specific node's subsequent nodes
This function is specific for a TreeView control. It will return a specific node's subsequent nodes according to the TreeView. It will return
API Declarations
'2.name of the specific node
'3.index # of the specific node
Rate This function is specific for a TreeView control. It will return a specific node's subsequent nodes
(1(1 Vote))
Function T_GetChildren(TreeView As TreeView, cStart As String, i As Integer) As String
Dim cResult As String
Dim cParent As String
On Error GoTo GetChildren_Err
Do
If TreeView.Nodes(i).Children > 0 And cParent <> TreeView.Nodes(i).Text Then
cParent = TreeView.Nodes(i).Text
i = TreeView.Nodes(i).Child.Index
Else
cResult = cResult & "'" & TreeView.Nodes(i).Text & "',"
If TreeView.Nodes(i) <> TreeView.Nodes(i).LastSibling Then
cParent = TreeView.Nodes(i).Parent.Text
i = TreeView.Nodes(i).Next.Index
Else
cParent = TreeView.Nodes(i).Parent.Text
i = TreeView.Nodes(i).Parent.Index
End If
End If
Loop While cStart <> TreeView.Nodes(i).Text
cResult = "(" & cResult & "'" & cStart & "')"
T_GetChildren = cResult
GetChildren_Err:
Select Case Err
Case 91
T_GetChildren = "('" & cStart & "')"
End Select
End Function
This function is specific for a TreeView control. It will return a specific node's subsequent nodes Comments
No comments yet — be the first to post one!
Post a Comment