[pygtk] Treeview multiple row DnD
Michael Urman
murman at gmail.com
Tue Jun 27 20:38:09 WST 2006
On 6/26/06, David Keogh <davekeogh at shaw.ca> wrote:
>
> Can someone give me a hint on how to drag multiple items from a
> gtk.TreeView? When I select mutliple rows and then click on one of them to
> begin the drag all the other selected rows are lost.
>
> I noticed that some Gtk+ apps written in C (file-roller for instance) use
> eggtreemultidnd.c
> (http://stuff.mit.edu/afs/dev/source/src-current/third/file-roller/src/eggtreemultidnd.c
> ) to get achieve this behaviour, is there no way to do this in Python?
If you're willing to leverage GPLv2 source, see
http://www.sacredchao.net/quodlibet/browser/trunk/quodlibet/qltk/views.py
for the MultiDragTreeView class - you may want to change out what it
draws in __begin, but other than that it should be nearly drop-in.
There's some other goodies in that file if you like them.
Michael
--
Michael Urman http://www.tortall.net/mu/blog
More information about the pygtk
mailing list