summaryrefslogtreecommitdiff
path: root/Master/tlpkg/tltcl/lib/tk8.6/demos/hello
diff options
context:
space:
mode:
Diffstat (limited to 'Master/tlpkg/tltcl/lib/tk8.6/demos/hello')
-rwxr-xr-xMaster/tlpkg/tltcl/lib/tk8.6/demos/hello22
1 files changed, 22 insertions, 0 deletions
diff --git a/Master/tlpkg/tltcl/lib/tk8.6/demos/hello b/Master/tlpkg/tltcl/lib/tk8.6/demos/hello
new file mode 100755
index 00000000000..d12e2b92cf0
--- /dev/null
+++ b/Master/tlpkg/tltcl/lib/tk8.6/demos/hello
@@ -0,0 +1,22 @@
+#!/bin/sh
+# the next line restarts using wish \
+exec wish86 "$0" ${1+"$@"}
+
+# hello --
+# Simple Tk script to create a button that prints "Hello, world".
+# Click on the button to terminate the program.
+
+package require Tk
+
+# The first line below creates the button, and the second line
+# asks the packer to shrink-wrap the application's main window
+# around the button.
+
+button .hello -text "Hello, world" -command {
+ puts stdout "Hello, world"; destroy .
+}
+pack .hello
+
+# Local Variables:
+# mode: tcl
+# End: