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?

Return True from the button press event of the tree to stop the
default handler (which handles selection) from being run. e.g. here's
some code which pops up a context menu on right mouse button and
replaces the selection only if there is one item selected.

   def on_button_press_event(tree, event):
       if event.button==3:
           popupMenu(event)
           return _count_selected_treepaths(tree) != 1
       return False

Stephen.
_______________________________________________
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