#!/bin/sh
# This is a Tcl/Tk script to be interpreted by wish (Tk8.3 or better): \
exec wish "$0" -- "$@"

#
#  test raising windows
#

# make two toplevels

foreach w {{} .w1 .w2} others {{.w1 .w2} {. .w2} {. .w1}} {
    if { $w != {} } {
	toplevel $w
	wm title $w "Test $w"
	wm group $w .
	set txt "This is window $w"
    } else { set txt "This is the main window ." }

    label $w.lab -text $txt
    pack $w.lab
    set i 0
    foreach o $others {
	button $w.b$i -text "Raise $o" -command "raise $o"
	pack $w.b$i
	incr i
    }
}

