DnD and default drag arguments

H H at h.com
Sun Jan 7 10:36:02 PST 2007


calling 

   wxDropSource::DoDragDrop()

will use as a flag wxDrag_CopyOnly.
On a successful drop wxDropTarget::OnData will be called. Interestingly 
the parameter 'def' in wxDropTarget::OnData can contain the value 
wxDragMove (at least under MacOSX 2.7.0; 2.8.0 is not changed in this 
respect) although drag copy only is set. Namely when the user tries to 
move the item instead of copying it. Nevertheless, the return value of 
wxDropSource::DoDragDrop() becomes wxDragCopy.
I think that this is mostly not an issue because you hardly test for the 
value of 'def' in wxDropTarget::OnData but I would like to know if this 
is the intended behaviour. I personally expected to receive only 
wxDropCopy results when wxDrag_CopyOnly is set.

Hartwig






More information about the wx-users mailing list