Hi,

On Wed, 10 Jan 2024 16:33:46 -0400
Cam Farnell <ms...@bitflipper.ca> wrote:

> To answer my own question: the focus was being given to another widget
> after the code in question had executed.
>
> That said, I still don't understand why focus_set followed by
> update_idletasks followed by focus_get would return None, but tkinter
> something works in strange and mysterious ways.
>

I can only guess here, have you tried calling update_idletasks() (or even
update()) *before* calling focus_set() ?

Best regards,

Michael
_______________________________________________
Tkinter-discuss mailing list
Tkinter-discuss@python.org
https://mail.python.org/mailman/listinfo/tkinter-discuss

Reply via email to