proc help {w helptext} \
{
set help .help
set text $help.text
set sb $help.sb
set dismiss $help.dismiss
getpos $w x y
incr x -100
toplevel $help -class Dialog
wm title $help {Help}
wm transient $help .
wm geometry $help +$x+$y
wm minsize $help 0 0
text $text -borderwidth 2 -relief sunken -yscrollcommand [list $sb set] -width 32 -height 8
scrollbar $sb -relief sunken -command [list $text yview] -width 10 -cursor arrow
button $dismiss -text Dismiss -command [list destroy $help]
pack $dismiss -side bottom -pady 2
pack $sb -side right -fill y
pack $text -expand true -fill both
bind $text <Any-Key> [list destroy $help]
$text insert end $helptext
set oldfocus [focus]
focus $text
tkwait window $help
focus $oldfocus
}