[Gtk-sharp-list] TreeView context menu.
19 Feb 2003 09:42:09 -0800
Well actually I've gotten a bit further since I emailed the list I have
a function that looks like so:
private void book_selection_changed(object o, EventArgs args)
Gtk.TreeIter iter =3D new Gtk.TreeIter();
Gtk.TreeModel model =3D (o as TreeView).Model;
Value value =3D new Value ();
if (book.Selection.GetSelected(out model, ref iter))
model.GetValue(iter, 1, value);
I'm just not clear on the whole "value" thing yet. Any ideas?
On Wed, 2003-02-19 at 05:31, Pablo Baena wrote:
> Make the TreeView widget catch the button_press_event signal. The
> handler method would look like this:
> private void OnTreeViewButtonPressEvent (object o, ButtonPressEventArgs a=
> Gdk.EventButton eventbutton =3D args.Event;
> if (eventbutton.button =3D=3D 3)
> // make the popup display
> I guess this is all you need, I didn't even work with TreeView.
> On Wed, 2003-02-19 at 07:36, =D8yvind Hvamstad wrote:=20
> > Hi, all. Great effort on the port!
> > I am not that into gtk, even so I would like to attach a glade generate=
> > popupmenu to a TreeView, I have the glade bit, and the TreeView bit all
> > sorted out, but how do I catch a right mouse click so I can fire up the
> > menu?
> > Hope someone can help.
> > =D8yvind (ISO-8859-1)
> > _______________________________________________
> > Gtk-sharp-list maillist - Gtkemail@example.com
> > http://lists.ximian.com/mailman/listinfo/gtk-sharp-list
> Pablo Baena <firstname.lastname@example.org>