Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Tk_center_frame_in_frame.py
- from Tkinter import *
- root=Tk()
- f1 = Frame(width=200, height=200, background="red")
- f2 = Frame(width=100, height=100, background="blue")
- f1.pack(fill="both", expand=True, padx=20, pady=20)
- f2.place(in_=f1, anchor="c", relx=.5, rely=.5)
- root.mainloop()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement