Canvas geometry
Hans Kristian Ruud
hans.kristian.ruud at inenco.no
Thu Jan 18 13:34:39 EST 2001
Hello
I try to retrieve the dimensions of a canvas in the following
manner:
h = eval( self.canvas.cget('height') )
w = eval( self.canvas).cget('width') )
however this does noe yield the true values (as I have
demonstrated by this
code):
self.canvas.create_line(5,5,5,h-5,w-5,h-5,w-5,5,5,5,fill='red')
The code in question is based upon the example draw3.py in
Grayson's book
Python and Tkinter programming (Chapter 10.2)
How do I retrieve the "true" extensions of the canvas?
På forhånd takk ( Thanks in advance )
- hans kristian -
More information about the Python-list
mailing list