Two top level windows : Toplevel : Tkinker PYTHON TUTORIALS


PYTHON TUTORIALS » Tkinker » Toplevel »

 

Two top level windows


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()



Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .


PYTHON TUTORIALS

 Navioo Tkinker
» Toplevel