Artifact
d6629744227cfa628c19e479e82faae37553d70202e4a08e976f246a25cb92a4:
Attachment "exercise.tcl" to
ticket [e5ccf542]
added by
erikleunissen
2020-12-14 12:11:41.
#! /bin/sh
# If executed as a shell script, the next line replaces the shell \
exec tclsh "$0" ${1+"$@"}
package require Tk
toplevel .two
foreach toplevel {. .two} {
foreach cmd [list "winfo class $toplevel" "bindtags $toplevel"] {
puts "\[$cmd\] : \"[eval $cmd]\""
}
puts ""
}
bind Toplevel <Button-1> {%W configure -bg green; update idletasks; after 300; %W configure -bg white}
puts "Click both toplevels with the mouse"