【发布时间】:2019-06-13 17:37:01
【问题描述】:
我的问题是将文本对齐设置为按钮的左侧。 按钮是一个图像。使用我的代码,文本设置在中心。
root = tk.Tk()
root.geometry('740x740+200+200')
img = PhotoImage(file="/Users/my_name/Documents/Wing101 Beispiele/button-2.png")
testBtn1=Button(root, fg="white", image=img, text="TEST1", compound=tk.CENTER, command=lambda: TestLogic(0)).place(x=400, y=200)
root.mainloop()
【问题讨论】:
标签: button text tkinter alignment