Tree Control Move siblings in list. Drag?

Started by Jim Short, December 15, 2018, 06:07:01 PM

Previous topic - Next topic

Jim Short

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?
Jim Short

Fred Tomke

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
Fred Tomke
Dipl.-Ing. (FH) Landespflege

[ landscaper - landscape developer - digital landscape and urban design]

Jim Short

Hi Fred, That helps. Does the item being dragged by built in means change in anyway, besides its new position?
Jim Short

Fred Tomke

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
Fred Tomke
Dipl.-Ing. (FH) Landespflege

[ landscaper - landscape developer - digital landscape and urban design]

Jim Short

Jim Short