[Pythonmac-SIG] Tkinter bug
mark brady
brady@mmm.com
Thu, 25 Jan 2001 11:39:12 -0800
There seems to be bug in Tkinter regarding canvas cursor locations.
The following code prints the cursor location when the mouse is
clicked in a scrollable canvas which is in a frame:
def drawCallback(event):
canvas = event.widget
x = canvas.canvasx(event.x)
y = canvas.canvasy(event.y)
print "clicked at", int(x+.5), int(y+.5)
Before scrolling there seems to be an offset of about 4 form the actual
canvas location. Maybe the frame location is being used. I suspect this
because there is a blank border of about 4 pixels between the frame and
the canvas.
After scrolling, the error goes away.
-Mark