i have made a tree with checkboxes, i want to write a code that on its click event the node itself get selected/deselected and if it is a parent node then all of its child should also get selected/deselected. the tree has only two levels. this is the initial code which i write

VB Code:
  1. Dim nd As Node
  2.     Set nd = Tree.Nodes.Add()
  3.     nd.Key = "AB"
  4.     nd.Text = "Address Book"
  5.     nd.Tag = "HEADS"
  6.        
  7.    
  8.     Set nd = Tree.Nodes.Add()
  9.     nd.Key = "QR"
  10.     nd.Text = "Query List"
  11.     nd.Tag = "HEADS"