moving treeview node

E

Ernst

Hi experts,

From Stephen Bullens dragdropexample I learned how to move nodes in a
treeview using drag and drop in the treeview.
All I have to do is give a node a new parentnode.
This code is used to do this:

Set moDragItem.Parent = oParent

When I do this the draged node becomes the first childnode of its new
parent.
When I add a node it becomes the last childnode of the parent.

I want to move a node to a specific position between other childnodes, by
drop while pressing the control-button.

I tied this with the following code:

Set moDragItem.Next= oParent
or
Set moDragItem.Previous= oParent
or
Set oParent.Previous= moDragItem
or
Set oParent.Next= moDragItem

None gave me the expected result.

Because the childnodes represent different types, it is not an option to add
a node en rename alle the childnodes.
Does anyone have a solution to this issue?

Kind reagrds Ernst
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top