[pygtk] Rewrite behaviour on signal 'button_press_event' in treeview

philopensource at hotmail.com philopensource at hotmail.com
Tue Sep 6 21:22:33 WST 2005


Hi list,

I need to select multiple rows from a treeview, drag and drop them to 
another treeview.
The problem is when i click on a selected row, th other rows previously 
selected are deselected.
But i want to keep them select for the drag & drop !

1. Is there a way to do it without rewriting callback for 
'button_press_event_signal'?

When i try to rewrite the callback, i need to know the iter or the path 
of the row i clicked on with the stuff given by the 'button-press_event' 
signal (treeview, event)
2. How can i do this?
I try to use event.x and event.y but it's only the position of the click 
in the treeview area. No link with data inside.
So i must know what are the rows actually displayed in the treeview (due 
to the use of a scrollbar), which position have each row.
It's not very obvious.

Thanks a lot,
Philippe Collet



More information about the pygtk mailing list