【发布时间】:2020-04-21 02:15:10
【问题描述】:
我需要以下代码中的按钮来调整大小,以便正确地适应文本。这怎么可能?当前是文本 all_definitions_list[0] 比按钮宽,然后文本会被弹出。
choice1=Button(newWindow, text=all_definitions_list[0], height=5, width=50,
command=lambda:wut(choice1, choice2, choice3, choice4, wordLabel))
choice1.place(relx=0.5, rely=y_list[0], anchor=N)
【问题讨论】:
-
“调整大小以正确适应文本”:不要使用参数
width=50
标签: python user-interface button tkinter size