OpenDCL Forums

OpenDCL => Runtime/AutoLISP => Topic started by: stephan_35 on November 20, 2009, 03:23:29 AM

Title: Treeview, move a node to a selected position (n element)
Post by: stephan_35 on November 20, 2009, 03:23:29 AM
Hello,

I would like to set position of node inside the treeview position,
As you see in my screenshot, all node are positionned depending of buid order.

I would like to move node3 before node2 and node6 before node5 in this tree !

So my question is, is anobody has an idea to do this ?

The first way, is to delete all child node and make them again in the good order, but is there something more easier ???

Thanks for help

Best regards.
Title: Re: Treeview, move a node to a selected position (n element)
Post by: Fred Tomke on November 20, 2009, 03:44:53 AM
Hi, stephan,

if you don't activate the drag&drop events it should work automatically. But I have not experiances in that. I want to control it by myself. That's why I use AddSibling. Delete the old one and add the same item on an other place. Have a look at AddSibling (http://www.opendcl.com/HelpFiles/index.php?page=Reference/Method/Tree/AddSibling.htm).

Fred
Title: Re: Treeview, move a node to a selected position (n element)
Post by: stephan_35 on November 20, 2009, 03:51:38 AM
Hello Fred,

In fact, moving a node automatically delete itself in the tree !

And you've right : AddSibling seem to reply correctly of my search !

Thanks
Best regards