Artifact
f9ef2ee73fd640e094ba2df06b0765189430d7b5:
Attachment "canvasbug.tcl" to
ticket [3307625f]
added by
dgp
2011-05-25 23:52:42.
set linecount 5000
. configure -width 600 -height 300
pack propagate . 0
set msg [canvas .msg]
set yscroll [scrollbar .yscroll -orient vertical \
-command [list $msg yview]]
pack $msg -side left -fill both -expand 1
pack $yscroll -side left -fill y
for {set i 0} {$i<$linecount} {incr i} {
append text "$i\n"
}
append text "The end"
$msg create text 0 0 -anchor nw -text $text
foreach {xmin ymin xmax ymax} [$msg bbox all] break
$msg configure -scrollregion [list $xmin $ymin $xmax $ymax]
$msg configure -yscrollcommand [list $yscroll set] \
-scrollregion [list $xmin $ymin $xmax $ymax]