Tkinter Help

Brian R. Szmyd szmyd at cs.colostate.edu
Mon May 5 18:24:23 EDT 2003


that was it! thanks for the help Chad, it is much appreciated.  I was 
confused about the use of the propagate methods, thinking they were an 
alternative to the grid() and pack().  Thanks again!

-regards

Chad Netzer wrote:
> 
> The methods are 'pack_propagate()' or 'grid_propagate()', depending on
> whether you will packing widgets in the frame or gridding.  Since your
> example uses gridding, here it is using grid_propagate( 0 ).  That
> essentially tells the frame to not resize itself to the smallest
> possible size to fit the gridded slaves within it.
> 
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> from Tkinter import *
> 
> root = Tk()
> 
> frame = Frame(root, width=640, height=480, bg='White')
> frame.pack(expand=1, fill=BOTH)
> frame.grid_propagate( 0 )
> 
> label = Label(frame, text='Some Text')
> label.grid(row=0, column=0)
> 
> root.mainloop()
> 


-- 
---------------------------------------
brian szmyd  |   szmyd at cs.colostate.edu
              |  cs.colostate.edu/~szmyd
              |             970.402.4431






More information about the Python-list mailing list