Re: Entrys focus



On Wed, 4 Jan 2006, Juan Pablo wrote:

Martyn Russell wrote:

On Sat, 2005-12-31 at 10:28 -0300, Juan Pablo wrote:

Hellow list! Im new here and obviusly because I have some questions ;-)

I made a window with several GtkEntry on it and would like that when the user press ENTER the next entry get focused, the same behaviour as pressing the TAB key but with ENTER.
Whats the correct way of doing this?


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 and
call gtk_window_move_focus() from there.

this list is about developing glib, gtk+ or language bindings however, not
about developing applications with them.



Thanks!

Saludos, Juan Pablo.

PS: Is this list for this kind of questions or there is another like gtk-users? The other topics are not like this...

Please direct general questions about GLib and Gtk+ to gtk-list gnome org Subscription information for this list can be obtained from:
	http://mail.gnome.org/mailman/listinfo/gtk-list
Archives, possibly already adressing your area of concern, are available at:
	http://mail.gnome.org/archives/gtk-list/

For writing applications with GLib and Gtk+, use gtk-app-devel-list gnome org This list is also suitable for problems related to the Windows port of Gtk+.
Subscription information:
	http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Archives:
	http://mail.gnome.org/archives/gtk-app-devel-list/

If you're new to GLib/Gtk+ programming, there's also a tutorial for Gtk+-2:
	http://www.gtk.org/tutorial/
and for Gtk+-1.2:
	http://gtk.org/tutorial1.2/
and the API Reference Documentation:
	http://developer.gnome.org/doc/API/

For general C, C++ or Unix questions, look into the respective standards, i.e
the recent C standard:
	http://www.google.com/search?q=c9x
ANSI C and ISO C:
	http://en.wikipedia.org/wiki/C_programming_language#ANSI_C_and_ISO_C
C++ description:
	http://en.wikipedia.org/wiki/C_plus_plus
The Standard Template Library Programmer's Guide:
	http://www.sgi.com/tech/stl/
64-bit and Data Size Neutrality:
	http://www.unix.org/whitepapers/64bit.html
IEEE floating-point standard:
	http://en.wikipedia.org/wiki/IEEE_Floating_Point_Standard
And The Single UNIX Specification, Version 2:
	http://www.opengroup.org/onlinepubs/007908799/index.html


gtk-devel-list mailing list
gtk-devel-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-devel-list

---
ciaoTJ



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