Skip to content Skip to sidebar Skip to footer

Pygobject Creating A Drag And Drop Source

from gi.repository import Gtk, Gdk def drag_data_get_cb(widget, drag_context, selection_data, info, time): print selection_data.get_data_type() print widget.get_text()

Solution 1:

It says in this tutorial that you cannot use widgets without windows, such as Gtk.Label as drag and drop sources. You can replace the label with a button for instance:

label = Gtk.Button.new_with_label("Drag Me!")

in order for this example to work.

Post a Comment for "Pygobject Creating A Drag And Drop Source"