Hi,

First question, is it possible to make a drag and drop to another non pygtk
application ( such as Notepad or whatever.. )
with the a simple mime type text/plain with pygtk on Windows?

Actually the only thing i've done, is to connect the signal "drag_end" to
the button and print this signal :
<gtk.gdk.DragContext object at 0x1ee24b8 (GdkDragContext at 0x21c5eb0)>

Any help would be appreciate, thanks a lot !

Here is my test code where i'm trying to do this :

########
import pygtk
pygtk.require('2.0')
import gtk

def sendCallback(widget, context, selection, targetType, eventTime):
   print "sendCallback", widget, context, selection, targetType, eventTime

def dragEnd(drag_context, data):
   print "dragEnd", drag_context, data

w = gtk.Window()
w.set_size_request(200, 150)

button = gtk.Button("DATA")
button.connect("drag_data_received", sendCallback)
button.connect("drag_end", dragEnd)
button.drag_source_set(gtk.gdk.BUTTON1_MASK, [ ("text/plain", 0, 0) ],
gtk.gdk.ACTION_COPY)

w.add(button)
w.show_all()

gtk.main()
########
_______________________________________________
pygtk mailing list   [email protected]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/

Reply via email to