Tkinter: How do I change the actual width of a widget?

Mudcat mnations at gmail.com
Sat Nov 11 12:23:09 EST 2006


Fredrik Lundh wrote:

>
> look for "pack_propagate" on this page for one way to do it:
>
>      http://effbot.org/tkinterbook/button.htm
>
> </F>


Thanks!

I had actually seen this, but on the pythonware site where it looks
like this:

f = Frame(master, height=32, width=32)
    f.pack_propagate(0) # don't shrink
    b = Button(f, text="Sure!")
    b.pack(fill=BOTH, expand=1)

I guess somewhere along the way it became necessary to use the pack
function with propagate.As a result, I was having problems getting it
to work and thought I was doing something else wrong.

And I guess I also missed the fact that Tkinter doc updates are being
done on effbot. I just upgraded my python version after a long time,
and I'm finding out all kinds of interesting things.




More information about the Python-list mailing list