Modifying Entry size

Jason Harper JasonHarper at pobox.com
Wed Mar 31 19:39:20 EST 2004


Fouff wrote:
> I'm trying to modify manually the size of a tkinter Entry .
> Especialy the width (in pixel for my calc), not in character as the
> width property of the widget.

That's not directly supported, but you can try this:
Create a Frame, and pack or grid it in the place where you're currently
putting the Entry.  Give the frame explicit width= and height= options,
and call .pack_propagate(0) on it so that it ignores the size of its
children.  Now create your Entry inside that frame, and pack it with the
fill and expand options turned on.
	Jason Harper



More information about the Python-list mailing list