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

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

  •  15-07-2023
  •  | 
  •  

문제

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?

도움이 되었습니까?

해결책

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top