rockman
Senior Member
- Local time
- Yesterday, 19:50
- Joined
- May 29, 2002
- Messages
- 190
Hi all,
I used the MS KB example to add Drag-and-Drop functionality to a treeview control that I have. It works pretty slick. But (and there always seems to be a but), when I drag a node to a different location the Index property doesn't change.
Quick Example:
Structure----------------Node(I).Text
Node1.......................Node1
Node2.......................Node2
Node3.......................Node3
Then drag Node2 above Node1...
Structure----------------Node(I).Text
Node2.......................Node1
Node1.......................Node2
Node3.......................Node3
It seems to me that the underlying Nodes structure (Index numbers) should indicate the change but they apparently don't.
Any thoughts?
Jeff
P.S. Interestingly, the FirstSibling, LastSibling, Next, Previous all reflect the change. Only, it's much harder to walk through the tree with these guys than a simple For/Next loop based on the Index number.
I used the MS KB example to add Drag-and-Drop functionality to a treeview control that I have. It works pretty slick. But (and there always seems to be a but), when I drag a node to a different location the Index property doesn't change.
Quick Example:
Structure----------------Node(I).Text
Node1.......................Node1
Node2.......................Node2
Node3.......................Node3
Then drag Node2 above Node1...
Structure----------------Node(I).Text
Node2.......................Node1
Node1.......................Node2
Node3.......................Node3
It seems to me that the underlying Nodes structure (Index numbers) should indicate the change but they apparently don't.
Any thoughts?
Jeff
P.S. Interestingly, the FirstSibling, LastSibling, Next, Previous all reflect the change. Only, it's much harder to walk through the tree with these guys than a simple For/Next loop based on the Index number.