wxPython and Drag and Drop

Christopher Paulicka cpaulicka at 8cs.com
Sat Sep 23 00:27:39 EDT 2000


I am using wxPython, and have created a PythonClassDataObject, allowing me
to drag class objects between different list ctrls and tree ctrls that I
have developed.

The problem is that some of the ctrls support some classes, while others
support other classes.

There doesn't seem to be a way for the wxDropTarget to query any information
from the wxDropSource.  You can do this under Windows using IDropTarget, and
access the data directly through the IDataObject interface.

If I could access the wxDropSource's PythonClassDataObject, I could check
the class inside of wxDropTarget::OnEnter(), and display the appropriate
symbol.  Right now, I cannot, so have to make the drop, figure out that the
class doesn't work, and then undo any damage.  This is not the right way to
do it.

Please help, anyone.

Christopher Paulicka

P.S.  On the same note, is there any way to query the key state for the
wxDropTarget methods, such as OnEnter?  Again, this is provided with
IDropTarget under Windows.




More information about the Python-list mailing list