On 9/9/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > 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, the other rows previously > selected are deselected. > But i want to keep them selected for the drag & drop ! > > 1. Is there a way to do it without rewriting callback for > 'button_press_event_signal'?
google and/or looking at API would have gave you a faster answer: http://pygtk.org/pygtk2reference/class-gtktreeselection.html#method-gtktreeselection--set-mode so you before everything treeview.get_selection().set_mode() > > 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. why do u use button_press_event and not sth better? renderer_text.connect('edited', and you get to have cell, path, text in the CB read the tutorial/api on treeview > Thanks a lot, > Philippe Collet have fun -- Nikos Kouremenos | Jabber ID: [EMAIL PROTECTED] | http://members.hellug.gr/nkour _______________________________________________ pygtk mailing list [email protected] http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
