What would be the tool, if any, that would put a list on the screen and then allow you to drag items in the list to change the order items in the list?
You can use a listbox control with "Drag/Drop Allow Begin" and "Drag/Drop Allow Drop" both set to true.
Thank you, I'll investigate that.
Ok I'm working and shouldn't be doing this since I don't get paid to program but I had to see if that was what I was looking for, and IT IS!!! Thank you, OWENWENGERD!
This does work. What event would fire after dropping in new location so new list could be save immediately?
Hi, Jim, I always set up my controls this way:
source control:
enable OnDragnDropBegin to ensure the user is allowed to drag the selected items
destination control:
enable OnDragOverFromControl to ensure the user is allowed to drop the selected items to the target
enable OnDragnDropFromControl to execute code to store the state into the databases
Regards, Fred
Thanks Fred,
Does this work when dragging only within the same control like just changing order of the items?
Run built-in code DragDropBegin
Save with KillFocus.
Selecting additional events messes with built-in behavior.
Jim
Hi, Jim,
Quote from: Jim Short on July 12, 2016, 05:12:54 AM
Does this work when dragging only within the same control like just changing order of the items?
yes, it does. Just check in the code of OnDragOverFromControl and/or OnDragnDropFromControl that the source control name is the same as the destination control name.
Regards, Fred