How to find out height of a Canvas
richard_chamberlain
richard_chamberlain at ntlworld.com
Sun Jun 4 06:35:21 EDT 2000
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.
Richard
Tim Rowe <digitig at cix.co.uk> wrote in message
news:memo.20000603235615.14417A at digitig.compulink.co.uk...
> How do I find out the height of a Tkinter Canvas? canvas.itemcget looks
> promising, but it needs two arguments (I get a Tcl error if I omit the
> second argument, or set it to None), and I can't find any documentation on
> what the second argument should be (or the first argument, for that
> matter; I'm assuming /that/ should be a string containing the name of the
> attribute).
>
> TIA.
More information about the Python-list
mailing list