in reply to Re: Tk Characters
in thread Tk Characters
I will check the link you provided now .. thanks#!/usr/local/bin/perl -w # # Simple Tk script to create a button that prints "Hello, world". Cli +ck on # the button to terminate the program. # # The first line below imports the Tk objects into the application, th +e second # line creates the main window, the third through sixth lines create t +he button # and defines the code to execute when the button is pressed, the seve +nth line # asks the packer to shrink-wrap the application's main window around +the # button, and the eight line starts the event loop. use Tk; $MW = MainWindow->new; $hello = $MW->Button( -text => 'Hello, world', -command => sub {print STDOUT "Hello, world\n"; exit;}, ); $hello->pack; MainLoop;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Tk Characters
by almut (Canon) on May 11, 2009 at 15:38 UTC | |
by Swalif (Scribe) on May 11, 2009 at 17:45 UTC | |
by almut (Canon) on May 11, 2009 at 18:36 UTC |