Python - Move focus to simpledialogbox Python - Move focus to simpledialogbox tkinter tkinter

Python - Move focus to simpledialogbox


You need to call update_idletasks before.

from tkinter import *from tkinter import simpledialogroot = Tk()root.update_idletasks()number = simpledialog.askinteger("Input", "How many rotations of the while loop? ",                                 parent=root, minvalue=0, maxvalue=10)root.mainloop()