pack [canvas .canv] -side left -expand true -fill both pack [scrollbar .scr -command {.canv yview}] -side right -fill y .canv configure -yscrollcommand {.scr set} .canv create window 0 0 -anchor nw -window [frame .canv.frm] for {set i 0} {$i < 5000} {incr i} { if {$i % 100 == 0} { grid [label .canv.frm.$i -text "label $i"] -sticky w -row $i -column 0 } elseif {$i % 50 == 0} { grid [checkbutton .canv.frm.$i -text "index $i"] -sticky w -row $i -column 0 } else { grid [checkbutton .canv.frm.$i -text "button $i"] -sticky w -padx 30 -row $i -column 0 } } update idletasks .canv configure -scrollregion [.canv bbox all]