Posted to tcl by kbk at Thu Mar 15 19:10:31 GMT 2007view pretty

toplevel .dialog
wm title .dialog "A Question"
label .dialog.l1 -text "How high is up?"
entry .dialog.e1 -textvariable altitude
button .dialog.b1 -text "OK" -command [list destroy .dialog]
grid .dialog.l1 .dialog.e1
grid .dialog.b1 -columnspan 2
tkwait window .dialog
tk_messageBox -title "Your answer" -message "The altitude is $::altitude"