Tk::MainWindow - Root widget of a widget tree
my $mw = MainWindow->new( ... options ... );
my $this = $mw->ThisWidget -> pack ; my $that = $mw->ThatWidget; ...
Perl/Tk applications (which have windows associated with them) create one or more MainWindows which act as the containers and parents of the other widgets.
The default title of a MainWindow is the basename of the script
(actually the Class name used for options lookup, i.e. with basename
with inital caps) or 'Ptk' as the fallback value. If more than one MainWindow is created
or several instances of the script are running at the same time the
Unlike the standard Tcl/Tk's wish, perl/Tk allows you to create
several MainWindows. When the last MainWindow is destroyed
the Tk eventloop exits (the eventloop is entered with the call of
You can apply all methods that a Toplevel widget accepts.
The method $w->MainWindow applied to any widget will return the MainWindow to which the widget belongs (the MainWindow belongs to itself).
Documentation is incomplete. Here are some missing items that should be explained in more detail: