简体   繁体   English

为小部件设置恒定大小并对齐小部件内的文本,tkinter

[英]set constant size for widget and align text inside the widget, tkinter

Didn't see it here nor in the documentation.在这里也没有在文档中看到它。 Is there any way to set a conatant size for widgets and also align the text inside the widget to be centered?有没有办法为小部件设置一个conatant大小,并将小部件内的文本对齐到居中?

I have an OptionMenu changing sizes by option我有一个 OptionMenu 按选项更改大小

It is decided by the text size in your Widget.它由 Widget 中的文本大小决定。 This question has already been answered in Stackoverflow. Stackoverflow 已经回答了这个问题。 You can find it here:你可以在这里找到它:

how to set a widget's size in tkinter? 如何在 tkinter 中设置小部件的大小?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM