Posted to tcl by de at Wed Jul 16 21:58:06 GMT 2014view raw

  1.  
  2. # This is a variant of http://paste.tclers.tk/3224 in the sense that
  3. # it demonstrates the problem I'm faced with with just tcl/tk core
  4. # (ruling out that the problem is located in the in 3224 used tktable
  5. # extension).
  6. #
  7. # If you run this script with any halfway recent 8.5.x or a 8.6.x
  8. # tcl/tk build under linux without xft support (build with
  9. # --disable-xft) and click on the both buttons the display changes
  10. # almost immediate.
  11. #
  12. # Not so, if you run this script (still on linux) with a recent
  13. # default build with xft support (which is, what you typically have at
  14. # hands). If you click first "Short text" to see something and then
  15. # "Long text" you see how slowly the display changes.
  16. #
  17. # With a standard windows build there isn't such a problem.
  18.  
  19. for {set row 0} {$row < 30} {incr row} {
  20. for {set col 0} {$col < 20} {incr col} {
  21. label .${row}_$col -width 5 -textvariable text
  22. grid .${row}_$col -row $row -column $col
  23. }
  24. }
  25.  
  26. button .ltext -text "Long text" -command {set text [string repeat "abcdef" 100]}
  27. button .stext -text "Short text" -command {set text "abcdef"}
  28. grid .ltext -row 30 -column 0 -columnspan 10 -sticky we
  29. grid .stext -row 30 -column 10 -columnspan 10 -sticky we
  30.