Posted to tcl by yeeling at Fri Jul 20 12:59:12 GMT 2007view pretty
proc fields {w contents} { frame $w set n 0 foreach i $contents { if [string match $* $i] { ttk::entry $w.$n -textvariable [string range $i 1 end] -width 10 } elseif [string match '$* $i] { ttk::label $w.$n -textvariable [string range $i 2 end] -wraplength 550 } else { ttk::label $w.$n -text $i -wraplength 550 } incr n } eval pack [winfo children $w] -side left -anchor w set w }