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 GridPrinter(AGrid : TStringGrid);
begin
PrintAt(15, 15, AGrid.Cells[0,1]);
end;
Now you can call it from any form having a string grid:
procedure TForm1.PrintGrid;
begin
GridPrinter(StringGrid1);
end;
var
MyForm : TForm;
begin
MyForm := TForm.Create(...);
// Now MyForm points to the object and you can use it.
MyForm.SomeMethod;
CallSomeProcedure(MyForm);
MyForm.Free;
end;
True. But Delphi doesn't use Pascal these days. Since at least v7, the language is called the Delphi language and not Pascal.What you are trying to do makes no sense in PASCAL;
procedure TForm1.Button1Click(Sender: TObject);
begin
GetEditInstance('Edit3').Text := 'Test';
end;
function TForm1.GetEditInstance(name: string): TEdit;
var
i: integer;
begin
for i := 0 to ComponentCount - 1 do
if name = Components[i].Name then
result := Components[i] as TEdit;
end;
Edit3.Text := 'Test';
customer := dataset.FieldByName('Id').AsInteger;
customer := datasetId.AsInteger;