Apr-25-2021, 08:41 PM
(This post was last modified: Apr-25-2021, 08:41 PM by knoxvilles_joker.)
OK, I added root.focus_set() after defining the root window and the popup window after closing allows focus to remain on the main window and each child window.
root = tk.Tk () root.title ("Root Window") root.geometry ("512x256") root.focus_set() label1 = Label (root, text = "This is the Root Window") button = Button (root, text = "Open Toplevel Window") button.config (command = open_a_toplevel_window) button1 = Button (root, text = "Open Toplevel Windowb") button1.config (command = open_b_toplevel_window) button2 = Button (root, text = "Open Toplevel Windowc") button2.config (command = open_c_toplevel_window) label1.pack () button2.place (x = 50, y = 75) button1.place (x = 210, y = 100) button.place (x = 110, y = 50) open_d_toplevel_window () root.mainloop ()