Resolved DoDragDrop cancel DoubleClick

Zexor

Well-known member
Joined
Nov 28, 2008
Messages
520
Programming Experience
3-5
When i put a DoDragDrop in the listview_MouseDown event, the MouseDoubleClick event won't trigger. All it does when i double click it is a label edit.
What is the best way to do a DoDragDrop for a listview?
I did a workaround by just storing the drag data in the MouseDown event, and wait til the MouseLeave event to do the DoDragDrop.
 
Without having tested, I wonder whether you might call DoDragDrop in the MouseMove event handler, if the mouse button is down. It would probably require more work to ensure that you only started dragging on the first MouseMove event after a MouseDown but that shouldn't be too hard. I've never actually implemented drag and drop in a real app myself - only tests and demos - so I've never felt the need to use other than MouseDown. I'll do a bit of testing and see what I can see.
 
Back
Top