No default root : Toplevel « Tkinker « Python Tutorial






No default root
import Tkinter
from Tkinter import Tk, Button
Tkinter.NoDefaultRoot()
     
win1 = Tk()         # two independent root windows
win2 = Tk()
     
Button(win1, text='Spam', command=win1.destroy).pack()
Button(win2, text='SPAM', command=win2.destroy).pack()
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