Re: Entrys focus
- From: Tim Janik <timj imendio com>
- To: Martyn Russell <martyn imendio com>
- Cc: Gtk+ Developers <gtk-devel-list gnome org>
- Subject: Re: Entrys focus
- Date: Thu, 5 Jan 2006 12:55:51 +0100 (CET)
On Thu, 5 Jan 2006, Martyn Russell wrote:
On Wed, 2006-01-04 at 16:16 +0100, Tim Janik wrote:
On Wed, 4 Jan 2006, Juan Pablo wrote:
Martyn Russell wrote:
Have a look at gtk_container_set_focus_chain (). If for example, you
have a GtkHBox with 3 GtkEntry widgets in it, the GtkHBox is the
container you would use to get or set the focus chain.
Thank you for this, it help me with my ooother problem :) but it is not what
i asked about :-p.
I have a window with a lot of entrys and the user needs to complete them
quick and easy.
So, when he press enter i need the next entry get the focus. Just like
pressing tab but with enter.
May I do this by checking the enter key press and emiting a tab? That could
be a lot of code for a dialog with 30 entrys if I have to do it one by one,
but if it works and there is no other way...
you probably want to connect to the entrie's button-press event
OR you might want to use the "activate" signal for the GtkEntry, that
would save you the hassle of playing with the event details to find out
if they pressed enter or some other key.
and call gtk_window_move_focus() from there.
Tim, I think you meant gtk_widget_grab_focus() or gtk_window_set_focus()
no, those functions don't advance the focus widget, which was requested to
occour upon enter.
] [Thread Prev