Tkinter canvas size determination

Dean Allen Provins dprovins at rpcl.com
Wed Feb 22 14:00:38 EST 2006


Cameron Laird wrote:
> In article <43FC9532.2050800 at rpcl.com>,
> Dean Allen Provins  <dprovins at rpcl.com> wrote:
> 
>>I need to determine the size of a canvas while the process is running.
>>Does anyone know of a technique that will let me do that?
> 
> 			.
> 			.
> 			.
> Does
>   >>> import Tkinter
>   >>> c = Tkinter.Canvas()
>   >>> c.create_oval(13, 51, 80, 130)
>   1
>   >>> c.pack()
>   >>> print c.cget("width")
>   284
> help?
> 
> There are actually several different notions of the size of a
> canvas.  The example abovve should be a good starting point,
> though.  
> 
> There's also a mailing list specifically for Tkinter <URL:
> http://tkinter.unpythonic.net/wiki/mailing_20lists  >; that
> might interest you.

Your suggestion helps immensely.  I missed it in Shipman's Tkinter
reference.  And thank you for the mail list reference.  I'll pursue it.

Regards,

Dean



More information about the Python-list mailing list