SV: SV: Changing the size of a Button

K Viltersten tmp1 at
Mon Mar 10 05:20:28 CET 2008

>> What i wish to do is to affect the size
>> of the button but not due to change of
>> text but due to resize of the frame it
>> resides in.
> This is done by the layout manager, too:
> import Tkinter as tk
> root = tk.Tk()
> button = tk.Button(root, text="42")
> button.pack(fill=tk.BOTH, expand=True)
> root.mainloop()
> Alternatively, with a grid layout:
> button.grid(row=0, column=0, sticky="nsew")
> root.rowconfigure(0, weight=1)
> root.columnconfigure(0, weight=1)

Ah, great! I'll try that right away.
After breakfast, of course! Thanks!

Konrad Viltersten
sleep    - a substitute for coffee for the poor
ambition - lack of sense to be lazy

More information about the Python-list mailing list