Reorder listbox items by drag and drop?


#1

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.


#2

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


#3

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


#4

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.