Treeview1.Nodes.Count
For I = Node.Index To Node.Child.LastSibling.Index If Tree.Nodes(I).Checked = False Then Tree.Nodes(I).Checked = True End If If Tree.Nodes(I).Children > 0 Then CheckRecurs (Tree.Nodes(I).Child) End If Next Public Sub CheckRecurs(NodEnfant As MSComctlLib.Node) ' pointage End Sub
Vous n’avez pas trouvé la réponse que vous recherchez ?
Posez votre questionPrivate Sub Rchild(Index As Long, Parent As String) ' procédure de pointage Récursive Dim i As Long For i = Index + 1 To Tree.Nodes.Count If Not Tree.Nodes(i).Parent Is Nothing Then 'comme on pointe ts les nodes qui suivent, évite err avec nodes sans parents If Tree.Nodes(i).Parent.Key = Parent Then If Tree.Nodes(i).Checked = False Then Tree.Nodes(i).Checked = True End If If Tree.Nodes(i).Children > 0 Then ' ne lance la récursité que s'il y a des enfants Call Rchild(Tree.Nodes(i).Index, Tree.Nodes(i).Key) End If End If End If Next End Sub