You can create the edits dynamically.
Be sure to set the owner and the parent of the edit boxes.
procedure TForm1.OnCreate(Sender: TObject);
var
x, y : Integer;
begin
for y := 1 to 9 do begin
for x := 1 to 9 do begin
FEdit[x,y] := TEdit.Create(self);
FEdit[x,y].Parent := self;
FEdit[x,y].Left := // function based on x
FEdit[x,y].Top := // function based on y
FEdit[x,y].Name := // function based on x and y
FEdit[x,y].Width // any value you like
FEdit[x,y].Height // any value you like
FEdit[x,y].Tag = 10*y + x;
FEdit[x,y].OnChange = OnHandleChange;
end;
end;
end;
procedure TForm1.OnHandleChange(Sender: TObject);
var
x,y : Integer;
begin
if not Sender is TEdit then Exit;
y := TEdit(Sender).Tag div 10;
x := TEdit(Sender).Tag mod 10;
// Add check if x and y are valid
// You now know that FEdit[x,y] is changed and you can handle accordingly.
end;
FEdit is a two dimensional array field of the form.