Canvas with scrollbars - how to get correct canvas coordinate when the scroll bars have moved?

PhilC pcooke at philc.net
Sat Oct 23 08:49:50 EDT 2004


Hi Folks,

I'm trying to click on a canvas to draw a line. The canvas has scroll
bars. All is well until I move the scrollbars. This naturally because
the relationship between my screen click and canvas event.x, event.y
has changed.

I need something that will add the proportional amount the scroll bar
has moved to the mouse click position. I see the terms canvasx and
canvasy but they appear to be used for converting screen position to
canvas position.

A pointer in the right direction would be appreciated.

Thanks

PhilC



More information about the Python-list mailing list