ตัวอย่าง
โค้ด
โค้ด: เลือกทั้งหมด
from tkinter import *
root = Tk()
root.option_add("*Font", "consolas 10")
Label(root, text="Mind", bg="light green").pack(anchor=W)
Label(root, text="mindphp", bg="blue").pack(fill=X)
Label(root, text="aaaaaaaaaa\na", bg="gold").pack(anchor=E)
Label(root, text="b\nb", bg="orange", wraplength=10, justify=RIGHT).pack(fill=X)
Label(root, text="c\nc", bg="deep sky blue", wraplength=10, justify=LEFT).pack(fill=X)
Label(root, text="d\nd", bg="hot pink", wraplength=10).pack(fill=X)
root.mainloop()
ทำให้เราจัดข้อความได้ง่ายมากขึ้น