When using VirtualTreeView drag operation by default is [doCopy,doMove]. Move operation is indicated by arrow pointer with small box and Copy operation is indicated by same pointer icon but with added [+] next to it.
By default VT uses copy operation and if you press modifier key (SHIFT key) it modifies operation to move therefore removing the [+] from pointer.
Here is what I need:
- reverse the operations (default would be move, with modifier key pressed – copy) and thus reverse pointer arrow too
- replace modifier key – CTRL instead of SHIFT
- read in an event which of the two operations occurred and start copy or move operation
Any pointers into right direction(s) appreciated.
More than change a modifier, you should in the
OnDragOverevent handler change the operation you’ll be going to perform. So, to add a CTRL key as a copy operation modifier you would write something like follows. TheEffectparameter value set in this event also changes the drag cursor, depending on the chosen operation. Except that is that value passed to theOnDragDropevent, where you can according that determine what to do with the dropped source:In the
OnDragDropevent handler you can determine the effect that was used: