home *** CD-ROM | disk | FTP | other *** search
/ PC World 2002 May / PCWorld_2002-05_cd.bin / Software / TemaCD / activetcltk / ActiveTcl8.3.4.1-8.win32-ix86.exe / ActiveTcl8.3.4.1-win32-ix86 / demos / Tk / hello < prev    next >
Encoding:
Text File  |  2001-10-22  |  552 b   |  23 lines

  1. #!/bin/sh
  2. # the next line restarts using wish \
  3. exec wish "$0" "$@"
  4.  
  5. # hello --
  6. # Simple Tk script to create a button that prints "Hello, world".
  7. # Click on the button to terminate the program.
  8. #
  9. # RCS: @(#) $Id: hello,v 1.2.18.1 2001/10/12 10:56:13 dkf Exp $
  10. # The first line below creates the button, and the second line
  11. # asks the packer to shrink-wrap the application's main window
  12. # around the button.
  13.  
  14. button .hello -text "Hello, world" -command {
  15.     puts stdout "Hello, world"; destroy .
  16. }
  17. pack .hello
  18.  
  19. # Local Variables:
  20. # mode: tcl
  21. # End:
  22.