Posted to tcl by kostix at Mon Jul 10 21:49:23 GMT 2006view raw
- #! /usr/bin/wish
- package require Tk
- variable tmo 5
- variable trans 1
- entry .tmo -textvariable tmo
- pack .tmo
- checkbutton .trans -variable trans -text {Is transient?}
- pack .trans
- button .start -text {Press, go to another desk and wait} \
- -command {
- after [expr $tmo * 1000] {
- toplevel .dlg
- if {$trans} { wm transient .dlg . }
- button .dlg.ok -text OK -command { destroy .dlg }
- pack .dlg.ok
- }
- }
- pack .start