[pygtk] Re: Stop a row in a TreeView from being draggable

Alan Franzoni alan.franzoni.xyz at gmail.com
Tue Jun 20 00:36:33 WST 2006


Il Mon, 19 Jun 2006 18:08:51 +0200, lefebure a stud.ntnu.no ha scritto:

> I am trying to stop rows in a TreeView to be draggable. I use the
> following code:

If you want to stop *all rows* from being draggable, here's a quick hack:

treeview.drag_source_unset()
treeview.drag_dest_unset()

Truly speaking, they can be dragged anyway, but they won't drop anywhere.

If you wanted to prevent just some rows from being dragged... I don't know,
maybe you could connect a callback to dynamically set/unset drag_source ,
but I think there'll be a better way around that.

-- 
Alan Franzoni <alan.franzoni.xyz a gmail.com>
-
Togli .xyz dalla mia email per contattarmi.
Rremove .xyz from my address in order to contact me.
-
GPG Key Fingerprint:
5C77 9DC3 BD5B 3A28 E7BC 921A 0255 42AA FE06 8F3E 
-
Blog: http://laterradeglieroi.verdiperronchi.com



More information about the pygtk mailing list