Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Moving treeview's nodes and its childs
Message
De
21/09/2004 20:55:13
 
 
À
21/09/2004 16:45:14
Information générale
Forum:
Visual Basic
Catégorie:
Contrôles ActiveX
Divers
Thread ID:
00944619
Message ID:
00944816
Vues:
11
>You don't have to drop nodeA, just replace its parentkey property to NodeB.key.

Sorry, I can not make it work ...
Lets say this code (in a DragDrop operation)
In MouseDown event of treeview
set nodA = treeview1.SelectedItem (previously declare as node in Declaration)

In DragDrop event of treeview
dim nodB as node
set nodB = treeview1.DropHighlight
nodA.Parent.Key = nodB.key (error: key not unique in collection)

I think I understand this: nodA.Parent.Key = nodB.key is trying to change the key of the parent of nodA and not the relative of nodA. Therefore since the key exists already and that I am trying to set another node key with it, I get this error.

Does that make sense?
Ben Rail
Business Solutions
LOGI.design
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform