Re: Field focus
| From: | James Cameron | Date: | Mon, 28 Apr 2003 23:09:25 +0000 |
| Subject: | Re: Field focus | ||
| References: | 1 | Groups: | php.gtk.general |
| Request: | Send a blank email to php-gtk-general+get-3309@lists.php.net to get a copy of this message | ||
Try grabbing the focus in a timeout function that is called about half
a second after. This is an ugly hack, but it works for me.
The problem is caused by the continued processing of callbacks for the
widget after you have issued the focus change. One of the processing
steps is to assign the focus to the next widget.
In a GTK+ application coded in C, the "correct" solution is to locate
and cancel the callbacks yet to be called for the widget being processed
at the time.
The hack is simpler.
Another solution is to have a "map" callback on your message dialog
window that does the focus change. I've not tested this, but I would
expect it to cause something similar. The essential goal is to have the
focus change code executed after the current widget callbacks are
processed.
--
James Cameron mailto:quozl@us.netrek.org http://quozl.netrek.org/