I try to drag and drop insert rows into a listbox, with visual feedback about the place where the new row will go. In itemDragMove I draw a hightlight on the targeted row or between the rows (if the cursor is close to the border between the rows).
This works fine until the listbox gets scrolled. Then my little trick with getRowPosition and calculating the relative position of the cursor inside the row does not work anymore, because getRowPosition returns the absolute position of the row. That’s OK, but I did not find any way to calculate the pixel offset due to the (potentially smooth) scroll.
Any idea or maybe a better way to provide the visual feedback?
Thanks.