【发布时间】:2023-03-28 14:10:01
【问题描述】:
我想将我的文本向左对齐,但 anchor='w' 似乎不起作用...
有什么建议吗?
from tkinter import Tk, Label
window = Tk()
lab = Label(window, text = 'hey', anchor='w')
lab2 = Label(window, text='hellooooooo', anchor='w')
lab.grid(column=0, row=0)
lab2.grid(column=0, row=1)
window.mainloop()
【问题讨论】:
-
你能试试this吗?
标签: python tkinter tkinter-text