#!/proj/tcl/install/5.x-sparc/bin/wish4.1b2 canvas .c -xscrollc {.xs set} -yscrollc {.ys set} -scrollregion {0 0 2000 2000} scrollbar .xs -orient horiz -command {.c xview} scrollbar .ys -orient vert -command {.c yview} pack .xs -side bottom -fill x pack .ys -side right -fill y pack .c -fill both -expand 1 frame .c.f -bg red -width 50 -height 50 .c create window 50 50 -window .c.f -anchor nw for {set i 1} {$i < 10} { incr i} { for {set j 1} {$j < 10} { incr j} { button .c.f.b_${i}_${j} -text "$i,$j" grid .c.f.b_${i}_${j} -column $i -row $j } }