[Tkinter-discuss] Determining size of a widget in grid?

Peter Milliken PeterM at resmed.com.au
Mon Feb 18 03:17:35 CET 2008


I have an application which uses the grid layout manager. One of my
widgets can grow (and shrink) in width as various events in the
application occur.

Is there anyway to determine the width of the widget in terms of the
column width that the grid manager determines? i.e. the grid manager
calculates a column width based on the widgets placed in it - I would
like to determine if the "new" width of the widget (as it grows/shrinks)
requires a columnspan value or not and if it does, then how many columns
should it span?

At the moment, as the width of the widget gets larger than the column
size allocated in the "other" columns, it makes the widgets in the same
column (but different rows) look untidy because that "column" is a
different size to the others (the "other" widgets are of a uniform size
- it is just this one widget that grows/shrinks that is out of play in
the grid/table layout).

Hope this is understandable :-)

Peter

Warning:  Copyright ResMed.  Where the contents of this email and/or attachment includes materials prepared by ResMed, the use of those
materials is subject exclusively to the conditions of engagement between ResMed and the intended recipient.
 
This communication is confidential and may contain legally privileged information.
By the use of email over the Internet or other communication systems, ResMed is not waiving either confidentiality of, or legal
privilege in,the content of the email and of any attachments.
If the recipient of this message is not the intended addressee, please call ResMed immediately on  +61 2 8884 1000 Sydney, Australia.





More information about the Tkinter-discuss mailing list