From: Joao Pedrosa Date: 2004-08-18T07:18:47+09:00 Subject: Re: Gtk::Menu question Hi, --- Joe Laughlin wrote: > I have a Gtk::TreeView popuplated with rows. When > the user right-clicks on > one of the rows, a menu pops up and the user has > several choices. I can > attach a callback function to one of these menu > choices and it's being > called correctly, but how can I pass to the callback > function some type of a > reference to what row was right-clicked? > > I hope that makes sense, > Joe When the user right-clicks on a row, it gets selected and the selected row can be retrieved with: treeview.signal_connect('button-press-event'){|tv, eb| if eb.button == 3 path, column = treeview.cursor p path.to_s end } Is that enough? You could join us on the Ruby-GNOME2 mailing list at http://lists.sourceforge.net/lists/listinfo/ruby-gnome2-devel-en Cheers, Joao __________________________________ Do you Yahoo!? Yahoo! Mail - 50x more storage than other providers! http://promotions.yahoo.com/new_mail