【发布时间】:2022-01-07 00:56:36
【问题描述】:
我希望我的文本向左(或向西)对齐。
我的代码:
import customtkinter as ctk
import tkinter as tk
root = tk.Tk()
root.geometry("300x100")
label = ctk.CTkLabel(master=root,
text="this is a label",
text_color="#fff",
bg_color="green",
width=250,
justify="left",
anchor="w"
)
label.place(x=0, y=0)
root.mainloop()
即使使用justify="left" 和anchor="w" 也没有任何变化,并且文本居中。为什么?我该如何解决?
【问题讨论】: