Guidance with Listbox-To-Listbox Drag-And-Drop?

Hi all,

Here’s my window:

On the left, I have a Listbox that has categories in it. Clicking on a category queries the database for only songs in that category. On the right, are the songs found in the category.

I’m trying to implement a drag-and-drop action so I can select songs on the right, drag them to a different category on the left, and update their “category” field in the database accordingly.

Where I’m stuck is determining where in the listbox the drop occurs. I can detect that the items WERE dropped, but not which row they were dropped onto. The rows are also not highlighting when the drag is hovered over them as I’d like.

Any guidance on how to approach this would be appreciated! Thanks in advance.

Event: DropObjectOnRow should tell you which row it was dropped on.

I’m not sure about the issue of rows not highlighting when dragged on top of. I haven’t built a Listbox like that in recent memory. If all else fails though, you should be able to track the position with the DragOverRow event and draw your own selection coloring.

2 Likes

That was it, thank you Tim!

I don’t know how I missed the existence of the DropObjectOnRow event, I had only implemented DropObject.

Thanks again!