if($EtkMenge > 1) { $LW2 = $LW->Canvas(-width=>'159', -height=>'224', -borderwidth=>'2', -relief=>'groove')->pack(); $LW->createWindow(385,125, -window=>$LW2, -anchor=>'nw'); $StartEtk2 = 1; $Etkges = 1; $Spalte = 1; $X1 = 5; $X2 = 55; $Y1 = 35; $Y2 = 65; $Head2 = $LW2->createRectangle(5,5,159,33,-fill=>'lightgrey'); $LW2->createText(20,50,-text=>"- 2. Blatt -"); $Foot2 = $LW2->createRectangle(5,195,159,223,-fill=>'lightgrey'); while ($Etkges <= 15) { if($EtkMenge >= 1 and $Etkges >= $StartEtk2) { $R_Etk2 = $LW2->createRectangle($X1,$Y1,$X2,$Y2, -fill=>'lightblue'); $LW2->createText($X1+20, $Y1+15, -text=>$Etkges); $EtkMenge --; } else { $R_Etk2 = $LW2->createRectangle($X1,$Y1,$X2,$Y2, -fill=>'lightgrey'); $LW2->createText($X1+20, $Y1+15, -text=>$Etkges); } $X1 = $X1 + 52; $X2 = $X2 + 52; $Spalte ++; if($Spalte == 4) { $X1 = 5; $X2 = 55; $Y1 = $Y1 + 32; $Y2 = $Y2 + 32; $Spalte = 1; } $Etkges ++; } } else { if($LW2) { $LW2->packForget(); } }