Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Treeview
Message
De
06/10/2004 06:43:56
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Contrôles ActiveX en VFP
Titre:
Divers
Thread ID:
00949070
Message ID:
00949079
Vues:
15
Thanks a lot Borislav, it Works fine...
The second question was not as important as the first :-)
Alessio


>>How can I do to select all of the children of a node ?
>>What I want to do is to check or uncheck all of the related nodes of a node by checking or unchecking the parent.
>>Is it possible to mark in a grey forecolor the check box of a Node whose children are partially checked ?
>>Thank you.
>>Alessio
>
>
>Alessio Add a method in the form named NodeCheck & put this code in it:
>
>LPARAMETERS oNode
>WITH oNode
>     m_chk = .Checked
>     IF TYPE("oNode.Child") == "O" .AND. .NOT. ISNULL(.Child)
>        .Child.Checked = m_chk
>        IF .Child.Children # 0
>           this.NodeCheck(.Child)
>        ENDIF
>        n = .Child.Index
>        DO WHILE n # .Child.LastSibling.Index
>           WITH this.oleTree.Nodes(n) && Put the Real Name of the TreeView
>                IF TYPE(".Next") == "O" .AND.;
>                   .NOT. ISNULL(.Next)
>                   .Next.Checked = m_chk
>                   IF .Next.Children # 0
>                      this.NodeCheck(.Next)
>                   ENDIF
>                   n = .Next.Index
>                ELSE
>                   EXIT
>                ENDIF
>            ENDWITH
>         ENDDO
>     ENDIF
>ENDWITH
>
>**** In NodeCheck Event of the TreeView
>LPARAMETERS node
>thisform.NodeCheck(node)
>
>
>This select or disselect all the child nodes of the parent node.
>
>About second question, sorry I can't help :o(((
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform