OpenDCL Forums

OpenDCL => Studio/Dialog Editor => Topic started by: Jim Short on December 15, 2018, 06:07:01 PM

Title: Tree Control Move siblings in list. Drag?
Post by: Jim Short on December 15, 2018, 06:07:01 PM
Its has been years since I worked on the tree control? I have a list of siblings and need to change the order they appear. Like move Full-Face above Pocket in .png. Is it easy to implement dragging them in Tree the column? The other option is to launch another form to manage the list order.
Any Ideas?
Title: Re: Tree Control Move siblings in list. Drag?
Post by: Fred Tomke on December 16, 2018, 01:07:07 AM
Hi, if I understood right, you want to move the last item to the top. I always overrided the built-in technology using DragBegin, DragOver and Drop event. Then I removed the dragged item and inserted it before the dropped item.

Regards, Fred
Title: Re: Tree Control Move siblings in list. Drag?
Post by: Jim Short on December 16, 2018, 07:29:24 AM
Hi Fred, That helps. Does the item being dragged by built in means change in anyway, besides its new position?
Title: Re: Tree Control Move siblings in list. Drag?
Post by: Fred Tomke on December 17, 2018, 10:21:29 PM
Quote from: Jim Short on December 16, 2018, 07:29:24 AM
Hi Fred, That helps. Does the item being dragged by built in means change in anyway, besides its new position?
Hi, Jim , I never use built in drag drop functionality because I always have to check the result by dragover.
So feel free to build a small sample to see if the built in technology already matches your needs.
Fred
Title: Re: Tree Control Move siblings in list. Drag?
Post by: Jim Short on December 18, 2018, 06:11:53 AM
Thanks Fred!