source ../../oo.tcl @import core.* @import gui.* wm geometry . "300x200" set box [[CanvasBox new] show] $box label: "This is a CanvasBox widget" set c [$box canvas] #- creating squarres set size 10 set offset 2 for {set row 0} {$row < 50} {incr row} { for {set col 0} {$col < 50} {incr col} { set x0 [expr $row * ($size + $offset)] set y0 [expr $col * ($size + $offset)] set x1 [expr $x0 + $size] set y1 [expr $y0 + $size] $c create rect $x0 $y0 $x1 $y1 -fill white -outline black -width 1 } }