Tkinter simpledialog boxes not getting focus in Windows 10 with Python3 Tkinter simpledialog boxes not getting focus in Windows 10 with Python3 tkinter tkinter

Tkinter simpledialog boxes not getting focus in Windows 10 with Python3


I have watched this question for a few days now hoping someone might shed some light on this issue. I'm running Python 3.6.5 under windows 10 and get the same problem.

I have tried several different things but it seems Microsoft does things their own way. I have finally found a thing that works, but only if you don't hide the root window:

import tkinter as tkfrom tkinter import simpledialogroot = tk.Tk()#root.withdraw()     # This does not work if you hide the root windowroot.update_idletasks()answer1 = simpledialog.askstring("Test1","This one gets focus",parent=root)root.update_idletasks()answer2 = simpledialog.askstring("Test2","This one doesn't",parent=root)