Just like Bryan Oakley said, you might do something like this:
import tkinter as tk
master = tk.Tk()
frame = tk.Frame(master)
subject = tk.Label(frame, text="Subject")
monday = tk.Label(frame, text="Monday")
tuesday = tk.Label(frame, text="Tuesday")
wednesday = tk.Label(frame, text="Wednesday")
thursday = tk.Label(frame, text="Thursday")
friday = tk.Label(frame, text="Friday")
subject.grid(row=0, column=0)
monday.grid(row=0, column=1)
tuesday.grid(row=0, column=2)
wednesday.grid(row=0, column=3)
thursday.grid(row=0, column=4)
friday.grid(row=0, column=5)
frame.pack(expand=True)
master.mainloop()
Check this out for more info on why the place
or pack
method can be used to center things.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…