Posted to tcl by de at Wed Jul 16 21:58:06 GMT 2014view pretty
# This is a variant of http://paste.tclers.tk/3224 in the sense that # it demonstrates the problem I'm faced with with just tcl/tk core # (ruling out that the problem is located in the in 3224 used tktable # extension). # # If you run this script with any halfway recent 8.5.x or a 8.6.x # tcl/tk build under linux without xft support (build with # --disable-xft) and click on the both buttons the display changes # almost immediate. # # Not so, if you run this script (still on linux) with a recent # default build with xft support (which is, what you typically have at # hands). If you click first "Short text" to see something and then # "Long text" you see how slowly the display changes. # # With a standard windows build there isn't such a problem. for {set row 0} {$row < 30} {incr row} { for {set col 0} {$col < 20} {incr col} { label .${row}_$col -width 5 -textvariable text grid .${row}_$col -row $row -column $col } } button .ltext -text "Long text" -command {set text [string repeat "abcdef" 100]} button .stext -text "Short text" -command {set text "abcdef"} grid .ltext -row 30 -column 0 -columnspan 10 -sticky we grid .stext -row 30 -column 10 -columnspan 10 -sticky we