[Gtk-sharp-list] KeyPressEvent not responding to
space/enter/up/down/left/right
Mike Voytovich
mikevoyt at gmail.com
Thu Jul 28 13:14:28 EDT 2005
Ben,
That worked - thanks for the help!
I did see the mention about [GLib.ConnectBefore] in the FAQ
regarding buttons/treeviews, but didn't realize it applied to other
widgets as well.
Thanks again,
-mike
On 7/28/05, Ben Motmans <ben.motmans at gmail.com> wrote:
> On 7/28/05, Mike Voytovich <mikevoyt at gmail.com> wrote:
> > ...
> > static void keypress_event(object obj, KeyPressEventArgs args)
> > {
> > System.Console.WriteLine("Keypress: {0}", args.Event.Key);
> > }
> > ...
>
> you need to add the [GLib.ConnectBefore ()] attribute to the method
> that receives the event, to make sure the method is invoked before the
> default signal handler
>
> in other words:
> [GLib.ConnectBefore ()]
> static void keypress_event (....)
>
> -- Ben
>
More information about the Gtk-sharp-list
mailing list