Re: Change focus on two GtkEntry [Again]
| From: | James Cameron | Date: | Wed, 19 Mar 2003 03:32:32 +0000 |
| Subject: | Re: Change focus on two GtkEntry [Again] | ||
| References: | 1 | Groups: | php.gtk.general |
| Request: | Send a blank email to php-gtk-general+get-3108@lists.php.net to get a copy of this message | ||
Yes, I understand the question. It wasn't easy.
You have two GtkEntry widgets. #1 and #2.
If the keyboard focus is in widget #1, you want;
- enter key to move focus to widget #2,
- tab key to move focus to widget #2,
Is that right?
If so,
a) add a signal for key press on widget #1,
b) in the signal handler, check for enter or tab,
c) call $widget2->grab_focus();
In GTK+, the function is named gtk_widget_grab_focus(). Translating
that to PHP-GTK semantics gives the method grab_focus() against the
class GtkWidget.
--
James Cameron mailto:quozl@us.netrek.org http://quozl.netrek.org/