Update tk to version 8.5.11
[msysgit.git] / mingw / lib / tk8.5 / demos / dialog2.tcl
blob2f45da845c25d4ecd25b72b3dc0fa9e3d38d3094
1 # dialog2.tcl --
3 # This demonstration script creates a dialog box with a global grab.
5 after idle {
6 .dialog2.msg configure -wraplength 4i
8 after 100 {
9 grab -global .dialog2
11 set i [tk_dialog .dialog2 "Dialog with global grab" {This dialog box uses a global grab, so it prevents you from interacting with anything on your display until you invoke one of the buttons below. Global grabs are almost always a bad idea; don't use them unless you're truly desperate.} warning 0 OK Cancel {Show Code}]
13 switch $i {
14 0 {puts "You pressed OK"}
15 1 {puts "You pressed Cancel"}
16 2 {showCode .dialog2}