tkinter python 入口高度 [英] tkinter python entry height

查看:12
本文介绍了tkinter python 入口高度的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在制作一个简单的应用程序只是为了练习 python,我想在其中编写文本,就像它是记事本一样.但是,我不能让我的条目更大.我正在为此使用 tkinter.有谁知道怎么把entry的高度变大?

I'm making a simple app just to practice python in which I want to write text as if it were Notepad. However, I can't make my entry bigger. I'm using tkinter for this. Does anybody know how to make the height of an entry bigger?

我尝试过这样的事情:

f = Frame()
f.pack()
e = Entry(f,textvariable=1,height=20)
e.pack()

我知道这行不通,因为没有高度"属性.但是,我看到有一个宽度属性.

I know this doesn't work because there isn't a property of "height". However, I see that there is a width property.

推荐答案

你也可以通过改变字体大小来改变它:

You can also change it by changing the font size :

Entry(
root,
font=("default", 40 or 20 whatever )

)

这篇关于tkinter python 入口高度的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆