Mega Code Archive

 
Categories / Python Tutorial / Tkinker
 

Frame Widgets and Centering

from Tkinter  import * root = Tk() root.geometry("600x500+10+10") myContainer = Frame(root) myContainer.pack(side=TOP, expand=YES, fill=BOTH) myLabel = Label(myContainer, text="This is a test") myLabel.pack(side=TOP, expand=YES, fill=BOTH) root.mainloop()