use strict; use warnings; use Tk; my $out; my $top = MainWindow->new(-title=>'Tk happy hour',-bg=>'white'); my $frame_top = $top->Frame->pack(-fill=>'x'); my $frame_middle = $top->Frame->pack(-expand=>'1',-fill=>'both'); my $frame_bottom = $top->Frame->pack(-expand=>'1',-fill=>'both'); my $frame_middle_left = $top->Frame->pack(-in=>$frame_middle,-side => 'left',-fill=>'both'); my $frame_middle_right = $top->Frame->pack(-in=>$frame_middle,-expand=>'1',-fill=>'both'); my $yellowtopleftlabel = $top->Label(-bg => 'yellow',-width => 32,-height => 15)->pack(-in=>$frame_top,-side=>'left'); my $graytoprightlabel = $top->Label(-width => 64,-height => 15)->pack(-in=>$frame_top,-fill=>'x'); my $graymiddleleftlabel = $top->Label(-width => 32,-height => 7)->pack(-in=>$frame_middle_left,-expand=>'1',-fill=>'y'); my $outlabel = $top->Label(-textvariable=>\$out,-bg => 'yellow',-font=>'Courier 10',-justify=>'left',-anchor=>'nw')->pack(-in=>$frame_middle_right,-expand=>'1',-fill=>'both'); my $graybottomlabel = $top->Label(-width => 64,-height =>2)->pack(-in=>$frame_bottom,-expand=>'1',-fill=>'both'); my $thisname='Moorhuhn'; my $thispath='C:\Programme\Moorhuhn'; my $thisconfig='yes'; $out=sprintf ("%-20s %s\n%-20s %s\n%-20s %s\n","Projectname:",$thisname,"Projectpath:",$thispath,"config files exist:",$thisconfig); MainLoop;