Mega Code Archive

 
Categories / Python Tutorial / Tkinker
 

Label and Button Widget Demo

import Tkinter top = Tkinter.Tk() hello = Tkinter.Label(top, text='Hello World!') hello.pack() quit = Tkinter.Button(top, text='QUIT',command=top.quit, bg='red', fg='white') quit.pack(fill=Tkinter.X, expand=1) Tkinter.mainloop()