Search code examples
pythondrag-and-dropwxpython

Shape drag and Drop in wxPython


I am trying to create a drag and drop app (like how the Unreal engine does with events - e.g. here) in Python using wxPython Phoenix.

I have found this Stack Overflow question which I have figured out how to adapt to make it draw a rectangle, but I can't figure out how to have connector nodes and to draw lines between the rectangles.

Can anyone link me a good tutorial or demo program please (which would be greatly appreciated) as a starting point.


Solution

  • This link might be helpful (DragImage demo file):

    https://github.com/wxWidgets/wxPython-Classic/blob/master/demo/DragImage.py