Drag and drop

I've used drag and drop for a year or so, but now I have
some more demands. It's not enough for me to just copy.
This means that the drag source needs to get the right
status back from the DoDragDrop method.

On

     result = dropSource.DoDragDrop(flags=wxDrag_DefaultMove)
     print "DragDrop result", result

I always get '1' which means "wxDragNone". What should I do
on the receiving end to get proper result codes? (I do get
the result I expected on the drop side, but obviously I
haven't figured out how to signal that back.

I think it might be something with OnDrop, but I don't
quite grok it.

···

--
Magnus Lycka, Thinkware AB
Alvans vag 99, SE-907 50 UMEA, SWEDEN
phone: int+46 70 582 80 65, fax: int+46 70 612 80 65
http://www.thinkware.se/ mailto:magnus@thinkware.se

Magnus Lycka wrote:

I've used drag and drop for a year or so, but now I have
some more demands. It's not enough for me to just copy.
This means that the drag source needs to get the right
status back from the DoDragDrop method.

On

    result = dropSource.DoDragDrop(flags=wxDrag_DefaultMove)
    print "DragDrop result", result

I always get '1' which means "wxDragNone". What should I do
on the receiving end to get proper result codes? (I do get
the result I expected on the drop side, but obviously I
haven't figured out how to signal that back.

I think it might be something with OnDrop, but I don't
quite grok it.

Actually, I think it's the return value of OnData that matters. Normally it would return the valkue passed to it which is based on the status of the modifier keys, but if you want to force it one way or the other then you can just return wxDragCopy or wxDragMove.

···

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!