cs_micheljoseph
Messages postés2Date d'inscriptionvendredi 3 juin 2005StatutMembreDernière intervention 3 juin 2005
-
3 juin 2005 à 15:58
tbbuim1
Messages postés940Date d'inscriptionjeudi 20 février 2003StatutMembreDernière intervention 3 février 2011
-
3 juin 2005 à 17:39
Bonjour,
Je développe actuellement un petit soft en VBA ou jutilise un Treeview issu de MSComctlLib.
Jen maîtrise bien la méthode Add, mais je nai pas trouvé dans MDSN comment supprimer un nud.
cs_micheljoseph
Messages postés2Date d'inscriptionvendredi 3 juin 2005StatutMembreDernière intervention 3 juin 2005 3 juin 2005 à 16:52
Merci,
J'ai bien la méthode Remove, mais je dois avoir un pb d'affichage, car le noeud rest sur le treeview
Voici mon code
Private Sub TreeView1_MouseUp(ByVal Button As Integer, ByVal Shift As Integer, ByVal x As stdole.OLE_XPOS_PIXELS, ByVal y As stdole.OLE_YPOS_PIXELS)
Dim tmp As MSComctlLib.Node
Index = SelectNode.Index
TextBoxindexNoeud.Value = Index
TextBoxNbreNoeuds.Value = TreeView1.Nodes.Count
Select Case Button
Case 2
Popup1
If NouveauNoeud Then
Set tmp = TreeView1.Nodes.Add(SelectNode, 4, , NomNoeud)
With tmp
.Expanded = True
.Selected = True
.Sorted = True
End With
Select Case NoeudAction
Case "Supprimer"
TreeView1.Nodes.Remove (Index)
Case "Copier"