[Gtk-sharp-list] TreeView ButonPressEvent doesn't trigger
mondalaci at gmail.com
Mon Oct 24 03:48:14 EDT 2005
> > Hi List,
> > I have problems with triggering several TreeView signals. I know that
> > many widgets don't receive lots of signals by default. I tried to
> > change that behaviour by manipulatating the event mask using:
> > tv.Events = EventMask.AllEventsMask; or
> > tv.AddEvents((int)EventMask.ButtonPressMask);
> > but none of them worked.
> > I've modified the GTK# ManagedTreeViewDemo.cs example to try this out
> > and demonstrate this problem.
> > ButtonReleaseEvent triggers, but ButtonPressEvent doesn't, even after
> > manipulating the event mask. I've both attached and included the code
> > here.
> > [...]
> You have to use the ConnectBefore attribute like this:
> public static void OnButtonPressEvent(object o, ButtonPressEventArgs
> and it should work for you.
Thanks Fredrik! That did the trick.
More information about the Gtk-sharp-list