Author Topic: Tree Control Move siblings in list. Drag?  (Read 415 times)

Jim Short

  • Full Member
  • ***
  • Posts: 235
    • Tahl Inc
Tree Control Move siblings in list. Drag?
« 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?
Jim Short

Fred Tomke

  • OpenDCL Technician
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2058
  • [ Mr. Bad Guy ]
    • Kommunale Entwicklungsplanung auf digitaler Basis - digital landscape and urban design
Re: Tree Control Move siblings in list. Drag?
« Reply #1 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
Fred Tomke
Dipl.-Ing. (FH) Landespflege

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

Jim Short

  • Full Member
  • ***
  • Posts: 235
    • Tahl Inc
Re: Tree Control Move siblings in list. Drag?
« Reply #2 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?
Jim Short

Fred Tomke

  • OpenDCL Technician
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2058
  • [ Mr. Bad Guy ]
    • Kommunale Entwicklungsplanung auf digitaler Basis - digital landscape and urban design
Re: Tree Control Move siblings in list. Drag?
« Reply #3 on: December 17, 2018, 10:21:29 PM »
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

  • Full Member
  • ***
  • Posts: 235
    • Tahl Inc
Re: Tree Control Move siblings in list. Drag?
« Reply #4 on: December 18, 2018, 06:11:53 AM »
Thanks Fred!
Jim Short