#! /usr/local/tk3.2/bin/wish -f
#
# Put up a message for a window 
# Input parameters:
# w - name of the window to be created
# text - text of message
#
# Note that message windows shape themselves to a specified aspect ratio;
# they are not appropriate for formated text.
proc msgtext {w text} {
    catch {destroy $w}
    toplevel $w
#    wm geometry $w +0+0
    wm title $w "Message"
    wm iconname $w "Message"

    frame $w.frame1 -relief raised -bd 2
    button $w.ok -text "OK" -command "destroy $w"
    pack append $w $w.frame1 {top fill} \
	    $w.ok {bottom pady 10 frame center fillx}
    message $w.frame1.m -font *-Times-Medium-R-Normal-*-180-* -aspect 500 \
	    -text "$text"
    pack append $w.frame1 $w.frame1.m {frame center}
    }


