New Tkinter windows don't get focus on OS X

Hendrik van Rooyen hendrik at microcorp.co.za
Fri Sep 11 03:14:43 EDT 2009


On Thursday 10 September 2009 18:19:09 Joshua Bronson wrote:

> True, but it'll still be a lot less painful for me to test my app if I
> can get it to steal focus
> when launched from the command line. If anyone knows how to do this in
> Tkinter, help would be much appreciated.
>

look for widget.focus_force()
and look for widget.grab_set_global()

Yahoo for:   Shipman Tkinter "new mexico tech"
for a nice manual, if you do not have it yet.

HTH - Hendrik





More information about the Python-list mailing list