Dùng place() geometry manager với anchor=CENTER và relx=.5, rely=.5 để đặt widget giữa cửa sổ.
Ví dụ
# Import thư viện
from tkinter import *
# Tạo khung
win = Tk()
win.geometry("700x350")
# Màu nền
win.config(bg='#4fe3a5')
# Label giữa cửa sổ
Label(win, text="Hello World!", font=('Helvetica 25 bold')).place(relx=.5, rely=.5, anchor=CENTER)
win.mainloop()Kết quả
Label "Hello World!" hiển thị chính giữa cửa sổ.
