I'm missing something about how sizes propagate in Tk. Try this:
from Tkinter import *
root = Tk()
frame1 = Frame(root, border=4, relief=RIDGE)
frame1.grid(sticky=E+W)
frame2 = Frame(root, border=4, relief=RIDGE)
frame2.grid(sticky=E+W)
label1 = Label(frame1, text='short', background='white')
label1.grid(sticky=E+W)
label2 = Label(frame2, text='quite a bit longer', background='white')
label2.grid(sticky=E+W)
root.mainloop()
label1 is inside frame1, and label2 is inside frame2. label1 comes out narrower than label2, as seen by the white background. But frame1 and frame2 are the same width, as seen by their borders. I thought the stickiness would expand label1 to be the same width as its parent.
If I put label1 and label2 inside the same frame, then label1 comes out as wide as label2:
frame1 = Frame(root, border=4, relief=RIDGE)
frame1.grid(sticky=E+W)
label1 = Label(frame1, text='short', background='white')
label1.grid(sticky=E+W)
label2 = Label(frame1, text='quite a bit longer', background='white')
label2.grid(sticky=E+W)
What am I missing? In real life, I have some stacked nested frames that are not expanding as I would like.
Thanks, Dan