Re: How To Set Tab Order

From: Date: Mon, 23 Aug 2004 19:36:32 +0000
Subject: Re: How To Set Tab Order
Groups: php.gtk.general 
Request: Send a blank email to php-gtk-general+get-4985@lists.php.net to get a copy of this message
D - This is totally imperfect, but fast. You can connect the 'activate' signal to your widgets, pass the next field, and then inside the called function do the move to the next field. Example: $entryField->connect_object('activate', 'editField', $nextField); function editField($next) { //we actually do additional edit/checks here, but for now, just: $next->grab_focus(); } Downside: activate signal only works for the enter key. Since most of our users prefer to enter through fields, it's not a problem for us. For those who cheat and use the tab key, we treat the screen like a web page, and rerun the core edits just prior to save. In spite of the downside, this was better than trying to deal with the other more painful signals to begin with, like 'changed'. Madeleine D. mmd At 12:06 PM 8/23/04 -0500, you wrote: >I can use set_focus() on a GtkEntry() widget to have focus when an >application is launched. But how do I customize which widget would next >receive focus, say from hitting the tab button? > >dave

« previous php.gtk.general (#4985) next »