Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
这是我正在使用 Python Tkinter 编写的程序的屏幕截图。我使用ttk.Entry小部件来获取用户输入。
ttk.Entry
我想知道如何将输入居中Entry(如您所见,输入现在卡在小部件的左侧)
Entry
条目小部件采用选项justify,对于居中的文本应该是'center'。创建小部件时,请执行以下操作
justify
'center'
e = ttk.Entry(master, ..., justify='center')