VB Code:
Private Sub Command1_Click()
AddTree "Main", "Global"
AddTree "Main1", "Battle.net", "Main"
AddTree "", "Login", "Main1"
AddTree "", "Options", "Main1"
AddTree "Main2", "Bot Options", "Main"
AddTree "", "Anti-Idle", "Main2"
AddTree "", "Filters", "Main2"
AddTree "", "GUI", "Main2"
End Sub
Public Function AddTree(ByVal Key As String, ByVal Caption As String, Optional ByVal ParentKey As String = "")
If ParentKey = "" Then
Set NN = TreeView1.Nodes.Add(, , Key, Caption)
Else
Set NN = TreeView1.Nodes.Add(ParentKey, tvwChild, Key, Caption)
End If
End Function