Added: Jul 26, 2002
Snippet uploaded by: snippet
Written By: gdebacker
Demo: Sorry, no demo
to have check box next to teh parent node and you check it, it will check all teh childs too.
Highlight all by clicking in box
Public Sub CheckNodes(MyTreeView As TreeView, ByVal Node As MSComctlLib.Node, bChecked As Boolean)
Dim iIndex As Integer
If Not Node Is Nothing Then
If Node.Children > 0 Then
iIndex = Node.Child.Index
Node.Child.Checked = bChecked
CheckNodes MyTreeView, Node.Child, bChecked
While iIndex <> Node.Child.LastSibling.Index
MyTreeView.Nodes(iIndex).Next.Checked = bChecked
iIndex = MyTreeView.Nodes(iIndex).Next.Index
CheckNodes MyTreeView, MyTreeView.Nodes(iIndex).Next, bChecked
CheckNodes MyTreeView, Node.Child.Next, bChecked
Node.Checked = bChecked
No Comments to show
Please completely fill out the form below if you want to review this snippet. All reviews are subject to validation.
Adding your comment. Please wait...
Thanks for adding your comment!. After further review it will be added.
There was a problem adding your comment. Please try again.
Please complete all the fields in the form before sending.