![]() |
Perl/Tk saves your favorite tools | ||
|
Main back: Ties next: Tk items |
![]()
(program source)
This is one of the simplest Tk programs you can write. First, you have to
create a main window (a big thing with border). Each call for MainWindow
creates a new one. You can create more than one for one application, and they
can reside on different screens... only on UNIX, of course.
Not before the To show an object, like a button, you require two things: first you have to create the object to be displayed on a window. Then you give the object a place in the window.
The list of parameters looks like a hash, which is almost true: within the
object creation routines it is tranformed into a hash. The labels start with a
dash which is (happily) accepted by Perl as part of a string left from the
' | ||
Created by Mark Overmeer with PPresenter on 22 May 2000. |