[Gtk-sharp-list] ButtonPressEvent in 0.15
Tiago Lima
tiago.lima@vianw.pt
Thu, 15 Jan 2004 20:38:21 +0000
Sorry, I think this should do it...
public class MyTreeView : TreeView
{
static GLib.GType type;
static MyTreeView()
{
//
// Register the type on the static constructor, so it is
// available on the instance constructors
//
type =3D RegisterGType (typeof (MyTreeView));
}
public MyTreeView() : base (type)
{
}
protected override bool OnButtonPressEvent (ref Gdk.EventButton evnt)
{
System.Console.WriteLine("OK!");
return false;
}
}
Thanks,
Tiago Lima
On Thursday 15 January 2004 20:05, Tiago Lima wrote:
> Hi,
>
> I've read the FAQ and tried to override the TreeView method, but with no
> sucesss, not even a segmentation fault... :)
>
> public class MyTreeView : TreeView
> {
> =A0 protected override bool OnButtonPressEvent (ref Gdk.EventButton evnt)
> =A0 =A0 {
> System.Console.WriteLine("Does not appear!");
> =A0 =A0 =A0 =A0 return false;
> =A0 =A0 }
> }
>
> When it is expected to have this corrected ?
> Would you recomend "downgrading" gtk# to 0.14 while this doesn't get fixe=
d?
> What are the differences between the two versions... I think in 0.14 this
> was working fine...
> I am developing an application and now I can't do context menus :(
>
> Please help,
> Tiago Lima
>
> On Tuesday 13 January 2004 17:04, Mike Kestner wrote:
> > On Mon, 2004-01-12 at 16:32, Ecmel Ercan wrote:
> > > As far as I can tell, ButtonPressEvent is defined in Widget and handl=
ed
> > > in TreeView but I need to connect to this event in order to do extra
> > > things in Double-click and Right-click (e.g. pop up a menu).
> >
> > This question is coming up often enough that I've added it to the FAQ:
> >
> > http://gtk-sharp.sourceforge.net/faq.html#3.3
>
> _______________________________________________
> Gtk-sharp-list maillist - Gtk-sharp-list@lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/gtk-sharp-list