Tk scrollable canvas

From: Jon Berry <berryj_at_SANTA.CSC.DEPAUW.EDU>
Date: Tue, 2 May 1995 07:59:48 -0500

In response to Drew's question about Tk canvas views, I've just done
some man page digging myself, and I was able to solve my problems using
"canvasx" and "canvasy" - these return the canvas coordinates of the
view coordinates passed to them. For example, if you click in the upper
left corner of the canvas, %x and %y get assigned something near (0,0).
If the canvas has been scrolled such that a transformation is needed,

.c canvasx %x

will return the correct x coordinate. Also, there are functions called
xview and yview that I haven't used, but look helpful - check out the
canvas man page.

Unfortunately, I am not an STk user yet - see my message about linking
with C++.

Jon
Received on Tue May 02 1995 - 15:01:12 CEST

This archive was generated by hypermail 2.3.0 : Mon Jul 21 2014 - 19:38:59 CEST