Stretching Images

Bill metaliu at yahoo.com
Fri Jun 7 20:08:14 EDT 2002


I'm currently using Tkinter for GUI development.  I have a Tkinter label
which is showing an image.  Is there a way for me to stretch the image to a
specific size?

I tried creating a Frame and specifying its width and height.  The I tried
putting the label in the Frame and packing it using expand=YES and
fill=BOTH, but the Frame gets resized regardless.  I also ran the method
.grid_propagate(0) on the Frame to make the Frame keep its size attributes,
but it keeps resizing regardless.  Also, when I resize the Frame manually
with the mouse afterwards, the label with the image just centers itself in
the Frame.  It doesn't stretch the image to fill the Frame like I want.  Any
suggestions on how I can get the proper effect I'm looking for?

Thanks ahead of time,
Bill





More information about the Python-list mailing list