Drag a button between panels in wxPython

Does anyone know of an example showing how to drag a button from one panel to another in wxPython?

I created a bitmap button on a panel and I would like to drag it to another panel and drop it there.

I haven't found any examples using buttons, only text and files.

I am using the latest Python and wxPython.

+1


source to share


1 answer


If you want to graphically represent drag and drop, one of the best ways to do this is to create a borderless Frame that follows the mouse as you drag. You remove the button from the source frame, temporarily place it in this drag frame, and then when the user falls, add it to the target frame.



+3


source







All Articles