Two top level windows : Toplevel « Tkinker « Python Tutorial






Two top level windows
import sys
from Tkinter import Toplevel, Button, Label
     
win1 = Toplevel()                  # two independent windows
win2 = Toplevel()                  # but part of same process
     
Button(win1, text='Spam', command=sys.exit).pack()
Button(win2, text='SPAM', command=sys.exit).pack()
     
Label(text='Popups').pack()        # on default Tk() root window
win1.mainloop()








18.31.Toplevel
18.31.1.Two top level windowsTwo top level windows
18.31.2.No default rootNo default root
18.31.3.Popup three new window, with style