Drag and drop from tree view

At this time, I'm not sure how to enable multiline selection on a Tree View.

It is possible to create a custom cursor. Here are two resources that I would look at for that purpose:

To simply change the cursor to any of the standard options, add this code to your Tree View's mousePressed event handler to initially alter the cursor:

from java.awt import Cursor
event.source.setCursorCode(Cursor.HAND_CURSOR)
event.source.parent.setCursorCode(Cursor.HAND_CURSOR)

and also add this code to your mouseReleased event handler to change the cursor back once the drag is finished:

from java.awt import Cursor
event.source.setCursorCode(Cursor.DEFAULT_CURSOR)
event.source.parent.setCursorCode(Cursor.DEFAULT_CURSOR)
1 Like