How to find out height of a Canvas

Tim Rowe digitig at cix.co.uk
Sun Jun 4 08:53:00 EDT 2000


In article <eaq_4.3871$JO2.84543 at news2-win.server.ntlworld.com>, 
richard_chamberlain at ntlworld.com (richard_chamberlain) wrote:

> Hi Tim,
> 
> from Tkinter import *
> root=Tk()
> canvas=Canvas(root,height=250,width=100)
> canvas.pack()
> print canvas ['height']
> 
> canvas.itemcget has two arguments, the first is the tag or id of a
> particular widget on the canvas and the second is the option you want 
> back.

Thanks -- it looks as if I was making things much more complicated than 
they need to be. Situation normal!



More information about the Python-list mailing list