Posted to tcl by mjanssen at Fri Dec 08 22:19:28 GMT 2006view pretty
package require Tk
# this widget is containing or normal text
text .t
pack .t
# this widget will contain the result, but is not visible yet
text .r
.t insert 1.0 test
proc display_result {} {
pack forget .t
pack .r
.r delete 1.0 end
.r insert 1.0 {this is the result}
bind .r <KeyPress> {pack forget .r ; pack .t ; break}
}
display_result