Re: Popup menu and TGtk::TreeStore



Mickael Drean wrote:

Hi there,

I finish my first "TreeView" this afternoon but I would like to have a popup menu. In example i've seen that popup were available only with Gtk::TreeView and not with Gtk::TreeStore. Anyway, is there a way to get one? (I like to know how which row i clicked)
Bye

Mick

------------------------------------------------------------------------

_______________________________________________
gtkmm-list mailing list
gtkmm-list gnome org
http://mail.gnome.org/mailman/listinfo/gtkmm-list


Hey Mick,

If you have not already done so, declare and associate a Gtk::TreeSelection with your Gtk::TreeView. Then connect a callback slot to the selection's 'changed' signal. In that callback slot you can use Gtk::TreeSelection::get_selected() method to get an iterator to the row that was selected, and launch your popup menu from there.

Bob
begin:vcard
fn:Robert Caryl
n:Caryl;Robert
org:Fiscal Systems, Inc.
adr:;;102 Commerce Circle;Madison;AL;35758;USA
email;internet:bob fis-cal com
title:Senior Software Design Engineer
tel;work:356-772-8920 X108
x-mozilla-html:TRUE
url:http://www.fis-cal.com
version:2.1
end:vcard



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]