New submission from Novel <[email protected]>:
Code to reproduce the problem:
```
import tkinter as tk
from tkinter.messagebox import showinfo
root = tk.Tk()
entry = tk.Entry(root)
entry.pack()
# root.update() # remove comment to fix the problem
showinfo('alert', 'this parrot is dead!')
root.mainloop()
```
Running this code will show the alert, and when the user clicks "ok" the entry
widget acts as if it's disabled and won't focus. Minimizing and restoring the
tkinter window brings the entry widget back to normal operation.
Workaround: Calling `update()` before the messagebox or filedialog call gives
normal behaviour.
This issue only affects Windows as far as I can tell.
----------
components: Tkinter
messages: 322516
nosy: nyt
priority: normal
severity: normal
status: open
title: Tkinter- On windows, calling filedialog or messagebox before the window
is drawn causes focus issues
versions: Python 3.6
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue34253>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com