Tkinter entry field question

Matthew Dixon Cowles matt at mondoinfo.com
Tue Oct 23 15:30:55 EDT 2001


On Tue, 23 Oct 2001 19:19:21 +0200, Laura Creighton <lac at strakt.com>
wrote:

>Tkinter Entry fields have a width but not a height.  If you don't like the
>height they come in, and know what height you want, how do you change 
>them?

Laura,
You can do something like:

>>> from Tkinter import *
>>> r=Tk()
>>> f=Frame(r,width=200,height=100)
>>> f.pack_propagate(0)
>>> f.pack()
>>> e=Entry(f)
>>> e.pack(fill=BOTH,expand=1)

but the entry widget will still hold only one line of text. If you
want multiple lines, you'll need to use the text widget.

Regards,
Matt



More information about the Python-list mailing list