Re: How do I stop the Gtk from "using" the Tab key



"Norman Black" <stonybrk ix netcom com> writes:
I have a window with a GtkNotebook and I do not want Gtk to do anything with
the Tab key. I receive the Tab key but Gtk is still cycling the tabs in the
notebook. My key press handler returns TRUE. In other words we are both
using the same Tab key press.


Connect to key_press_event on the toplevel window, and
gtk_signal_emit_stop_by_name() the signal.

Returning TRUE only prevents propagation of the event from child
widget to parent, in this case you are a toplevel window and have no
parent.

Though, in GTK+ 2.0 the plan is for returning TRUE to actually stop
the emission.

Havoc




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]