1
2
3
4
5
6
7
8
9
10
11
12
$fensterL = $hauptfenster -> Canvas (-height=>$hoehe,-width=>$breite/4,-background=>'chocolate',-relief=>'groove',-bd=>3);
$fensterM = $hauptfenster -> Frame (-height=>$hoehe,-width=>$breite/4,-background=>'chocolate1',-relief=>'groove',-bd=>3);
$fensterR = $hauptfenster -> Frame (-height=>$hoehe,-width=>$breite/4,-background=>'chocolate2',-relief=>'groove',-bd=>3);
$fenster = $hauptfenster -> Frame (-height=>$hoehe,-width=>$breite/4,-background=>'chocolate3',-relief=>'groove',-bd=>3);
$fensterL -> pack(-side=>'left');
$fensterM -> pack(-side=>'left');
$fensterR -> pack(-side=>'left');
$fenster -> pack(-side=>'left');
$anmeld=$fensterL->Label(-text=>"Anmeldename")->pack(-side=>'top');
$test=$fensterM->Button(-text=>"Button")->pack();
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70
use warnings; use strict; use Tk; my $hoehe = 80; my $breite = 600; my $hauptfenster = Tk::MainWindow->new(); my $fensterL = $hauptfenster->Canvas( -height => $hoehe, -width => $breite / 4, -background => 'chocolate', -relief => 'groove', -bd => 3 )->pack( -side => 'left', -fill => 'both', -expand => 1 ); my $fensterM = $hauptfenster->Frame( -height => $hoehe, -width => $breite / 4, -background => 'chocolate1', -relief => 'groove', -bd => 3 )->pack( -side => 'left', -fill => 'both', -expand => 1 ); my $fensterR = $hauptfenster->Frame( -height => $hoehe, -width => $breite / 4, -background => 'chocolate2', -relief => 'groove', -bd => 3 )->pack( -side => 'left', -fill => 'both', -expand => 1 ); my $fenster = $hauptfenster->Frame( -height => $hoehe, -width => $breite / 4, -background => 'chocolate3', -relief => 'groove', -bd => 3 )->pack( -side => 'left', -fill => 'both', -expand => 1 ); $fensterL->packPropagate(0); $fensterM->packPropagate(0); my $anmeld = $fensterL->Label( -text => "Anmeldename" )->pack( -side => 'top', -expand => 0, -fill => 'none' ); my $test = $fensterM->Button( -text => "Button" )->pack( -expand => 1, -fill => 'none' ); MainLoop();