Tkinter canvas zooming (sortof)

Bob Greschke bob at
Fri May 26 18:41:16 CEST 2006

I have a program that sucks in a list of equipment positions (Lats/Longs), 
opens a Toplevel frame with a canvas set to, for example, 700x480 pixels, 
and then does all of the calculations and plots the objects with 10-pixel 
wide ovals and rectangles.  Now I want to zoom in (or out), but I don't want 
the ovals and rectangles to change size.  I just want them to spread out or 
get closer together.  So scale() doesn't seem to be the way to go.  What I 
want to do is just make the "logical" canvas bigger and replot everything, 
but when I reconfigure the canvas size to make it bigger the Toplevel frame 
itself gets bigger.  I want the frame to stay the same size, but still be 
resizable.  I have scrollbars, and they seem to work ok, and scrollregion 
seems to do what it should, but I can't figure out how to get them to all 
work together to do what I want.  Help?



More information about the Python-list mailing list