How to change the height of a Zelle Graphics entry box?

85 Views Asked by At

I've been working on a project, and I am wondering how to change the height of an entry box in the Zelle Graphics Library. Does anyone know if this is possible and if it is, how to change it? (I'm coding in python by the way)

1

There are 1 best solutions below

0
On

The height of an Entry box is determined by the font in use by the box. If you use a larger (taller) font, you'll get a taller (and wider) box. You can do this by setting the default font in the DEFAULT_CONFIG dictionary, or using the setSize() method of Entry:

from graphics import *

window = GraphWin()

widget = Entry(Point(100, 100), 10)
widget.draw(window)

window.getMouse()
widget.setSize(24)

window.getMouse()
window.close()

Click on the window once and the Entry box should double in size as the font doubles in size.

Or did you want something else?