[schlenk], 19. July 2005: Answering a question on self-tcl.de [http://www.self-tcl.de/forum/viewtopic.php?p=2004] i came up with this little demo. It shows how to dynamically resize a label with some text, when the window is resized: ====== package require Tk package require math::interpolate proc createInterpolationTable {win font text} { set max [winfo vrootwidth $win] set oldsize [font configure $font -size] set xval [list] set yval [list] set x 0 set size 2 while {$x < $max} { font configure $font -size $size set x [font measure $font $text] lappend xval $x lappend yval $size incr size 4 } font configure $font -size $oldsize return [list $xval $yval] } proc adjustFont {font width ipt} { set newSize [lindex [math::interpolate::neville [lindex $ipt 0] [lindex $ipt 1] $width] 0] font configure $font -size [expr {int($newSize)}] } proc configureBinding {font ipt win width heigth} { bind .test.l {} adjustFont $font $width $ipt after idle [list bind .test.l [list configureBinding title $ipt %W %w %h]] } font create title -family Verdana -size 10 toplevel .test set txt "Some Title" set ipt [createInterpolationTable .test title $txt] label .test.l -text $txt -font title pack .test.l -expand 1 -fill both wm geometry .test 400x300+0+0 bind .test.l [list configureBinding title $ipt %W %w %h] ====== [MHo] - 2008-02-27: just tested on windows. After starting the program, I had no chance to klick anything: the window constantly flickers. Had to press Alt+F4 to cancel. Looks like the ''Configure''-event is constantly fired... [fr] - 2020-01-31: added first and last line in "proc configureBinding", initial size by "wm geometry .." ---- See also [font] <> Example | Characters | GUI