Reorder listbox items by drag and drop?


Hello, been struggling with this for days now getting my head around it: what do i need to reorder listbox items, i have successfully created a few times listboxes based on the juce demo one, i even got it to work as a drag and drop souce, but how do i reorder them? and provide visual feedback? Thanks.


Well, you'd need to intercept the rows being dropped, and re-order the actual data that your listbox is showing.


And if Im drawing a custom component? it fills the entire listbox row


Well, if you're drawing it yourself then you'd need to make your custom component react to drag-and-drop and draw some kind of appropriate drag-over graphics.