#!/usr/local/bin/perl -w
use
Tk;
use
Tk::Xrm;
# This does not work properly yet
use
Tk::Pretty;
sub
top
{
my
$name
=
shift
;
my
$top
= MainWindow->new();
$top
->Button(
'-text'
=>
"Quit"
,
'-command'
=>[
'destroy'
,
$top
])->
pack
;
$top
->Button(
'-textvariable'
=>\
$name
,
'-command'
=> [
sub
{
my
$name
=
shift
;
"$name\n"
},
$name
])->
pack
;
$top
->DirTree()->
pack
;
$top
->title(
$name
);
}
&top
(
"One"
);
&top
(
"Two"
);
MainLoop;