Drag'n'Drop and SelectionData



Hey,

In an application I have a gtk.VBox filled with own widgets. The plan is
to let the user reorder these widgets per drag and drop.

These widgets are set as the drag_sources and the parent VBox as the
drag destination. Now I need to somehow inform the VBox which child
widget was moved. If I understood correctly it's SelectionData what is
used for that.
I would like to add a link of the child to SelectionData to be able to
reorder the children as the user wishes (if you see better alternatives
here, please tell me)
However the documentation states: "In PyGTK the selection data is always
a string...". Does that mean that I need to convert my widgets to a
string and then back to a widget for the drag and drop process?
Or do I miss another way or best practice to exchange this information?

Thanks for your help!
Paul



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]