Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
procedure Form.ButtonClick(Sender: TObject);
const
// tailor these constants to suit your need
FirstBoxTop = 10;
BoxLeft = 10;
BoxWidth = 121;
SpaceBetweenBoxes = 4;
var
I: Integer;
begin
// find what boxes already exist named EditX
// where X is a sequential number from 1..N
I := 1;
while FindComponent('Edit'+IntToStr(I))<>nil do
Inc(I);
// create an Edit button with next number I
// and initialize properties
with TEdit.Create(Self) do begin
Parent := Self;
Name := 'Edit' + IntToStr(I);
Text := '';
Left := BoxLeft;
Width := BoxWidth;
Top := FirstBoxTop +
(Height * (I-1)) +
(SpaceBetweenBoxes * (I-1));
end;
end;