unit Unit1;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
StdCtrls, ExtCtrls;
type
TForm1 =
class(TForm)
Timer1: TTimer;
procedure FormCreate(Sender: TObject);
procedure Timer1Timer(Sender: TObject);
private
{ Private-Deklarationen }
public
{ Public-Deklarationen }
end;
var
Form1: TForm1;
Labels:
array of TLabel;
implementation
{$R *.DFM}
procedure TForm1.FormCreate(Sender: TObject);
var
i,
// Zeilenzähler
j,
// Spaltenzähler
lg,
// Labelgröße
bg :Integer;
// Boxgröße
s :
String;
index2: integer;
begin
Form1.Height := round(screen.height*0.8);
Form1.Width := Form1.Height;
bg := Round((Form1.Height-20)/3);
lg := Round((bg-5)/3);
for i:=1
to 9
do
begin
for j:= 1
to 9
do
begin
for index2:=1
to 81
do
begin
SetLength(Labels,index2+1);
Labels[index2]:=TLabel.Create(self);
Labels[index2].Top := ((i-1)* lg)+13;
Labels[index2].Parent:= Form1;
Labels[index2].AutoSize := false;
Labels[index2].Font.Size := 12;
Labels[index2].Left := 10 + lg *(j-1);
Labels[index2].Height:= lg;
Labels[index2].Width:=lg;
Labels[index2].Caption:= IntToStr(i)+'
,'+(IntToStr(j));
Labels[index2].Alignment := tacenter;
//SetLength(Labels, 1);
end;
Labels[10].Color:= clblue;
// Funzt nicht.
end;
end;
end;
end.