use strict; use Tk; use Tk::HList; # # MainWindow # my $mw = MainWindow->new; # # Menu # my $m = $mw->Menu(qw/-type menubar/); $mw->configure(-menu => $m); my $ma = $m->cascade(-tearoff => 0, -label => '~Ansicht'); my $pr_sicht = 1; # # PanedWindow # my $panel = $mw->Panedwindow(qw/-orient horizontal/)->pack; my $fr_left = $mw->Frame->pack;; my $fr_right = $mw->Frame->pack; $panel->add($fr_left, $fr_right); my $hlist = $fr_left->HList(qw/-bg white/) ->pack(qw/-expand yes -fill both/); my $data = $fr_right->Canvas(qw/-bg white/) ->pack; $ma->checkbutton( -label => 'Projekt-Explorer', -variable => \$pr_sicht, -command => sub { unless( $pr_sicht ){ $panel->packForget; } else{ $panel->pack; } } ); MainLoop;