Tkinter pack difficulty

Tony aclarke11 at yahoo.co.uk
Wed Sep 12 15:05:06 EDT 2007


On Sep 12, 6:22 pm, Simon Forman <sajmik... at gmail.com> wrote:
> Hi all,
>
>Snip> Any thoughts or advice?
>
> Thanks in advance,
> ~Simon
>

This seems to do what you want, the difference is that the expand
option is left out top and bottom, also I increased height and put in
a width value as well:
from Tkinter import *

t = Tk()

header = Frame(t, bg="black", height=30, width = 10)
header.pack(fill=X, side=TOP, anchor=N)

body = Frame(t, bg="grey")
body.pack(expand=1, fill=BOTH, anchor=CENTER)

log = Frame(t, bg="white", height=30, width = 10)
log.pack( fill=X, side=BOTTOM, anchor=S)

t.mainloop()

Ciao
Tony




More information about the Python-list mailing list