12 Sep 2005 04:08
(0,0) off the visible area of a Canvas
Bill Barksdale <bill <at> billbarksdale.com>
2005-09-12 02:08:04 GMT
2005-09-12 02:08:04 GMT
I am sure this must be a common question but I couldn't find anything about it. When I run the following on my system, the first line appears cut off and the second line doesn't appear at all. I believe this is because (0,0) is not part of the visible area of a canvas, and that it starts instead at (3,3) or thereabouts. How can I fix this? import Tkinter as TK root = TK.Tk() canv = TK.Canvas(root,width=100,height=100,bg='red') canv.pack() canv.create_line(0,100,100,0) canv.create_line(0,0,0,100) Thanks, --Bill Barksdale
RSS Feed