Hi,

I've made a simple example in which I enable a drag_source and drag_destiantion in an treeview. I used the gtk.gdk.BUTTON1_MASK to ensure that the user can only drag with the left mouse button, but it seems that the user can use any button to start the drag session. How can I prevent this?

thanks,

Toon

# treeview drag'n'drop problem

import gtk, gtk.gdk

tv = gtk.TreeView()
tv.insert_column_with_attributes(0, "test", gtk.CellRendererText(), text=0)
tm = gtk.ListStore(int)
tv.set_model(tm)

tv.enable_model_drag_source(gtk.gdk.BUTTON1_MASK, [("example", 0, 0)],
                            gtk.gdk.ACTION_DEFAULT)
tv.enable_model_drag_dest([("example", 0, 0)], gtk.gdk.ACTION_DEFAULT)


for i in range(10): tm.append([i*i-i])

wi = gtk.Window()
wi.add(tv)

wi.show_all()
gtk.main()
_______________________________________________
pygtk mailing list   [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/

Reply via email to