I Just know how to Expand the Treeview when the user click on the checkbox, but how to uncheck all the child nodes and un-expand the treeview ?

so if the treeview nodes is not clicked then unable to expand...

For example I have

- Parent 1
   - Child 1
         -Child 1 of 1
         -Child 2 of 1
   - Child 2

If the user didn't checked on the Parent 1, impossible to Expand...
But if all was checked and suddenly the user un-checked the Parent 1, everything unchecked and Un-Expanded...

Hope my question is understandable...

Many Thank !

Edited by Dorayaki: n/a

8 Years
Discussion Span
Last Post by Dorayaki

Plus another question without making new thread...

How to loop ToolStripMenuItem ?

For Example I have 10 ToolStripMenuItem
I rename all of them to ToolStripMenuItem1 until ToolStripMenuItem10

how to loop that thing ?

Here is my code

For i As Integer = 0 To TreeView1.Nodes.Count - 1
       Form1.Controls.Item("ToolStripMenuItem" & i).Enable = False

But cannot works..
Any Idea please ?

Thank you

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.