Den 07.06.2011 21:01, skrev Edvin Syse:
I would like to use DND to reorder nodes within the same parent node, is
there any support for dropping between nodes?
Alternatively, I can make do with showing a popup after drop, unless
someone has a better suggestion? :)
I managed to do this by calculating the position of the mouse cursor
relative to the bounds of the node under the cursor, so that if I'm high
up on the node bounds, I'm OVER the component, then ON in the middle,
and UNDER when I'm close to the bottom of the node bounds.
I also do the same calculation in DropTarget#dragMove, and would like to
render a line over or under the node I'm hovering over if applicable. I
guess I need to override the skin's paint method to do this. How do I
install a custom skin just for this TreeView? :)
-- Edvin