2015-09-03

Hello, world!

The classic first demonstration program.

pack [button .b -text "Hello, world!" -command exit]

In a Tcl/Tk shell such as wish, this program creates a window and places a plain, unstyled button on it. The text on the button is "Hello, world!" and when you click the button, the program exits.

If you just want to print the text inside the shell, try

puts "Hello, world!"

No comments:

Post a Comment