Posted to tcl by kostix at Mon Jul 10 21:34:39 GMT 2006view pretty
#! /usr/bin/wish package require Tk package require BWidget 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] { Dialog .dlg -title {It's me} \ -separator 1 -anchor e \ -modal none -default 1 -cancel 1 \ -transient $trans set f [.dlg getframe] button $f.ok -text OK -command { destroy .dlg } pack $f.ok .dlg draw } } pack .start