简体   繁体   English

如何在Tkinter Entry小部件中将文本与TOP对齐

[英]How to align text to TOP in a tkinter Entry widget

I want for the text in my entry widget to start appearing at the top as if it was top justified. 我希望我的输入小部件中的文本开始出现在顶部,好像它是顶部对齐的一样。 With tkinter.Entry 's justify option you can justify the text to the left, right or center, but not top or bottom. 使用tkinter.Entry的justify选项,您可以将文本左对齐,右对齐或居中对齐,但不对齐顶部或底部。 Specifically, I would like to have an option to do the function of the highlighted button below in google docs. 具体来说,我想选择在Google文档中执行以下突出显示的按钮的功能。

在此处输入图片说明

An entry widget only accepts a single line of text. 条目小部件仅接受一行文本。 There is no concept of vertical alignment in an Entry widget. Entry小部件中没有垂直对齐的概念。

The Text widget supports multiple lines, but it also doesn't have any support for vertical alignment. Text小部件支持多行,但也不支持垂直对齐。

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

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