I am having problems getting drag/drop to work for items within a tree ctrl. I have the tree ctrl working as a file drop target, which was straightforward to implement. Now I want the ability to drag/drop items within the tree itself. My strategy has been to catch the BEGIN_DRAG event and create a drop source at that time. Inside my BEGIN_DRAG handler I set the tree ctrl's drop target to a derived TextDropTarget. I then setup a wxCallAfter so that I can call DoDragDrop on my drop source object without blocking the BEGIN_DRAG event. I call event.Allow to allow the drag to occur, per the documentation. The problem is that once I drag an item and release the mouse, the OnDrop calls get called appropriately for the drop target, but END_DRAG doesn't get called until I click again somewhere else. I know that I am returning from the drop target handler and also that I am returning after the DoDragDrop call, but it seems that something is holding up the END_DRAG event.
ยทยทยท
_________________________________________________________________
The new MSN 8: advanced junk mail protection and 2 months FREE* http://join.msn.com/?page=features/junkmail