[wxPython] Object-based DND mix-ins

Quicky module to make handling of object drag-and-drop more like having the source window send a richly-configured event to the target window.

Details:
  The module defines a PyCommandEvent sub-class which provides information about the drag-and-drop operation. The event is partially configured by the drop source, passed through the drag-and-drop system as a key into a global store, then is finalised and passed to the target window as an event in the pending events queue.
  Mix-in classes are provided for both source and target windows, making it very easy to get basic functionality with a few simple calls and an event mapping.
  The implementation is fairly straightforward and simple (naive), but it does make the process of creating drag-and-drop systems which trade Python objects fairly easy. Consider it a proof-of-concept or neat idea, rather than a professional-quality utility module. There's lots of things left to do, but I thought others might want to play with it even in its primitive state.

Available at:
http://members.rogers.com/mcfletch/programming/objectdnd.py

Enjoy all,
Mike

···

_______________________________________
   Mike C. Fletcher
   http://members.rogers.com/mcfletch/

Quicky module to make handling of object drag-and-drop more like having
the source window send a richly-configured event to the target window.

Sounds nice!

···

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

Some (very) minor improvements to the Python-object drag-and-drop explorations and a demo using the objectdnd module to create a list control which can easily allow you to "shuffle" generic Python objects among instances of the control.

Currently the demo uses an icon list in one of my projects, so it's not going to run out-of-box, but the code is fairly easy to understand (I hope). Just comment out the import and put in your own code to get a pointer to an image list and some indices into that list.

http://members.rogers.com/mcfletch/programming/objectdnd.py
http://members.rogers.com/mcfletch/programming/objectlist.py

Enjoy all,
Mike

Mike C. Fletcher wrote:
...

Available at:
http://members.rogers.com/mcfletch/programming/objectdnd.py

...