[pygtk] Focus issue with change of notebook page
Neil Dugan
pygtk at butterflystitches.com.au
Fri Dec 21 14:23:07 WST 2007
Tony Nelson wrote:
> At 3:49 PM +1100 12/20/07, Neil Dugan wrote:
> ...
>
>>Haven't tried this exactly, but have you tried putting the
>>grab_focus() call after a small timeout delay ?
>>
>>gobject.timeout_add(500,widget.grab_focus)
>
>
> How long should the timeout be to not have it ever be too short? How short
> should the timeout be so that the user won't interact with the wrong widget?
You will need to experiment. I would find the minimum time it worked
in, and double that to be on the safe side. I don't think anyone
would start typing within a 1/2 second. After all it takes a while to
move your hand from the mouse back to the keyboard.
More information about the pygtk
mailing list