I am trying to figure out how to stack two widgets in a frame
vertically so that they both expand horizontally and during vertical
expansion, the top one sticks to the top of the frame and the bottom
one consumes the remaining vertical space.  I thought this would do it
but it doesn't.  What am I missing?

from Tkinter import *

class AFrame(Frame):
   def __init__(self,master,**config):
      Frame.__init__(self,master,config)
      size=50
      self.l1= Label(text="abc",relief="groove")
      self.l1.pack(side=TOP,expand=YES,fill=X,anchor=N)
      self.l2= Label(text="abc",relief="groove")
      self.l2.pack(side=TOP,expand=YES,fill=BOTH)

af= AFrame(None)
af.pack(side=TOP,expand=YES,fill=BOTH)
mainloop()

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to