-- Forwarded to tutor list --

On Thu, 23 Nov 2006 16:25:41 +0000
"Asrarahmed Kadri" <[EMAIL PROTECTED]> wrote:

> Sorry to bother you,
> But can u please explain what does grid_columnconfigure() do..
> 
> 

The best place for questions like this are usually the Tk man pages :)
Once you get used to them it is easy to figure out how to "translate" them into 
Python.

>From the grid manpage:

grid columnconfigure master index ?-option value...?
(...)
 The -weight option (an integer value) sets the relative weight for 
apportioning any extra spaces among
 columns. A weight of zero (0) indicates the column will not deviate from its 
requested size. A column whose
 weight is two will grow at twice the rate as a column of weight one when extra 
space is allocated to the
 layout.
(...)

So if you have a Frame f and do:

f.grid_columnconfigure(0, weight=0)
f.grid_columnconfigure(1, weight=2)
f.grid_columnconfigure(2, weight=1)

column 0 will not expand at all when the frame is stretched horizontally,
column 2 will expand and column 1 will expand even more.

I hope this helps

Michael
_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to