Pad++ Programmer's Guide
bind
command. For example, the following code creates two squares. Clicking on the left one zooms in a bit, and clicking on the right one zooms out a bit.
.pad create rectangle 0 0 50 50 -tags rect1 -fill black .pad create rectangle 100 0 150 50 -tags rect2 -fill white .pad bind rect1 <ButtonPress> {.pad moveto 0 0 2 1000} .pad bind rect2 <ButtonPress> {.pad moveto 0 0 1 1000}
Copyright Computer Science Department, The University of New Mexico