[Gtk-sharp-list] TreeView context menu.
Pablo Baena
pbaena@uol.com.ar
19 Feb 2003 13:31:36 +0000
--=-QWOshtM3XhnYybARMrLZ
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
Make the TreeView widget catch the button_press_event signal. The
handler method would look like this:
private void OnTreeViewButtonPressEvent (object o, ButtonPressEventArgs args)
{
Gdk.EventButton eventbutton = args.Event;
if (eventbutton.button == 3)
// make the popup display
}
I guess this is all you need, I didn't even work with TreeView.
Pablo
On Wed, 2003-02-19 at 07:36, Øyvind Hvamstad wrote:
> Hi, all. Great effort on the port!
>
> I am not that into gtk, even so I would like to attach a glade generated
> 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.
>
> Øyvind (ISO-8859-1)
>
> _______________________________________________
> Gtk-sharp-list maillist - Gtk-sharp-list@lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/gtk-sharp-list
--
Pablo Baena <pbaena@uol.com.ar>
--=-QWOshtM3XhnYybARMrLZ
Content-Type: text/html; charset=utf-8
Content-Transfer-Encoding: 7bit
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
<META NAME="GENERATOR" CONTENT="GtkHTML/1.1.7">
</HEAD>
<BODY>
Make the TreeView widget catch the button_press_event signal. The handler method would look like this:<BR>
<BR>
<PRE>private void OnTreeViewButtonPressEvent (object o, ButtonPressEventArgs args)
{
Gdk.EventButton eventbutton = args.Event;
if (eventbutton.button == 3)
// make the popup display
}
</PRE>
I guess this is all you need, I didn't even work with TreeView.<BR>
<BR>
Pablo<BR>
<BR>
<BR>
On Wed, 2003-02-19 at 07:36, Øyvind Hvamstad wrote:
<BLOCKQUOTE TYPE=CITE>
<PRE><FONT COLOR="#737373" SIZE="3"><I>Hi, all. Great effort on the port!
I am not that into gtk, even so I would like to attach a glade generated
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.
Øyvind (ISO-8859-1)
_______________________________________________
Gtk-sharp-list maillist - Gtk-sharp-list@lists.ximian.com</FONT>
<A HREF="http://lists.ximian.com/mailman/listinfo/gtk-sharp-list"><FONT SIZE="3">http://lists.ximian.com/mailman/listinfo/gtk-sharp-list</I></FONT></A></PRE>
</BLOCKQUOTE>
<PRE><TABLE CELLSPACING="0" CELLPADDING="0" WIDTH="100%">
<TR>
<TD>
-- <BR>
Pablo Baena <<A HREF="mailto:pbaena@uol.com.ar">pbaena@uol.com.ar</A>>
</TD>
</TR>
</TABLE>
</PRE>
</BODY>
</HTML>
--=-QWOshtM3XhnYybARMrLZ--