Tk: filling a frame with a widget

Paolo Pantaleo paolopantaleo at gmail.com
Wed Oct 4 07:55:43 EDT 2006


I have this code

from Tkinter import *

root=Tk()
Button(root).pack(fill=BOTH)
root.mainloop()

I would expect the button filling all the client draw area of the
Frame, but when I resize the root window the button becomes wider, but
not higher ( I get some empty space under the button). How could set
the button to fill always all the space available?

Well maybe some other solution exists, since my problem is this:

I have a resizable window and i want to keep it filled with a Canvas
displaying an image (PhotoImage). Can I get the in some way the size
of the clien draw area of the window containig the canvas?

Thnx
PAolo

-- 
if you have a minute to spend please visit my photogrphy site:
http://mypic.co.nr



More information about the Python-list mailing list