Does anyone have a custom function to Remove a child node from a TreeView and move it to another child?
That may not make sense, so here's an Example:
Private Sub Form_Load()
Dim Test As Node
Dim Test2 As Node
Set Test = TreeView1.Nodes.Add(, , "Testing", "Testing")
Test.Expanded = True
Test.Bold = True
Set Test2 = TreeView1.Nodes.Add(, , "Testing2, "Testing2")
Test2.Expanded = True
Test2.Bold = True
TreeView1.Nodes.Add "Testing", tvwChild, "hello"
'function to Remove child node from parent and add it to another part.. ?? :lol:
Private Sub RemoveChildNode(tvTree As TreeView, strName As String)
Dim i As Integer
For i = tvTree.Nodes.Count To 0 Step - 1
If strName = tvTree.Nodes("Testing").Text Then 'or something...
' remove strName from "Testing" part
' and add strName to "Testing2" part
End If
Next i
End Sub
'usage:
RemoveChildNode(TreeView1,"hello")
Get my drift? :D
Thanks in advance.