wxPython -- Drag and Drop image between position-fixed containers, what is the suitable container?

StackOverflow https://stackoverflow.com/questions/23464220

  •  15-07-2023
  •  | 
  •  

Question

I am using wxPython for a board game. And want to drag chessman over positions.

What is the container I should use? Should I put image for chessman in its own panel or as button or somewhere?

Was it helpful?

Solution

I think you could use a wx.Panel without any issues. There is a CustomDragAndDrop example in the wxPython demo that shows how to drag and drop images from one wx.Window to another. A wx.Panel is a type of wx.Window and I would think it would be better to use anyway. I would give that a try.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top