Re: how to prevent Gtk::Entry to "Pass on" key event?



Hi Robert

Thanks for the tip.
I tried this and it works!

But in the documentation for Gtk::Entry::signal_activate it says:
  Deprecated:
    Use signal_key_press_event() or signal_focus_out_event() instead.

Apparently the developers seem to think i can get the same effect with
signal_key_press_event(),
so i looked again at what Kjell originally suggested.

Finally i found that:when connecting the Entry to this signal, you
have to use after=false
(in order to get all the keys the Entry swallows).


Thanks to all of you helping me to find a way through the Event mysteries :)

Jody

On Wed, Jun 20, 2012 at 7:31 PM, Robert Pearce <rob bdt-home demon co uk> wrote:
> Hi jody,
>
> On Wed, 20 Jun 2012 15:33:10 +0200 you wrote:
>>
>> So if there is no way to get a Gdk_Return from a Entry,
>> i guess i'll have to to do some ugliness (catch all key events first,
>> and if my entry has the focus, ill call the appropriate function;
>> otherwise (no focus) i check for 'f' etc.etc)
>
> Could you perhaps avoid needing to get the GDK_Return? The Gtk::Entry
> presumably handles the return key in a way that causes it to emit a
> signal (signal_activate?). Could you not look for that instead?
>
> _______________________________________________
> gtkmm-list mailing list
> gtkmm-list gnome org
> https://mail.gnome.org/mailman/listinfo/gtkmm-list


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