[Tkinter-discuss] winfo_width problem

Gustavo Henrique Cervi gustavo-listas at overstep.com.br
Fri Sep 30 23:42:06 CEST 2005


Try using "winfo_reqheight(), winfo_reqwidth()"

...

winfo_reqheight(), winfo_reqwidth(). Return the "natural" height (width) 
for self. The natural size is the minimal size needed to display the 
widget's contents, including padding, borders, etc. This size is 
calculated by the widget itself, based on the given options. The actual 
widget size is then determined by the widget's geometry manager, based 
on this value, the size of the widget's master, and the options given to 
the geometry manager.


[]'s
-Gustavo

evgeny fadeev wrote:

>Hi,
>i am trying to use winfo_width to determine widget's size
>and it always returns me 1 regardless of wheter widget is packed/gridded or 
>not.
>
>in native Tcl/Tk
>winfo width .widget
>works fine, i.e. returns actual width in pixels
>
>direct tk call from python tk.call('winfo','width',widget._w) still returns 
>1
>
>i guess it points to some bug in tkinter  ......  what do you think?
>
>Thanks.
>Evgeny.
>
>_________________________________________________________________
>Express yourself instantly with MSN Messenger! Download today - it's FREE! 
>http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/
>
>_______________________________________________
>Tkinter-discuss mailing list
>Tkinter-discuss at python.org
>http://mail.python.org/mailman/listinfo/tkinter-discuss
>
>  
>



More information about the Tkinter-discuss mailing list