unit Unit1N;
interface
uses
System.SysUtils, System.Types, System.UITypes, System.Classes, System.Variants,
FMX.Types, FMX.Controls, FMX.Forms, FMX.Graphics, FMX.Dialogs, FMX.StdCtrls;
type
TForm1 =
class(TForm)
Label1: TLabel;
procedure FormCreate(Sender: TObject);
procedure FormActivate(Sender: TObject);
private
{ Private declarations }
procedure DisplayMyMPLabels(
index: integer;
name:
string;value:real);
public
{ Public declarations }
end;
var
Form1: TForm1;
MPLAbel:
Array[1..15]
of Tlabel;
MPLAbelV:
Array[1..15]
of Tlabel;
implementation
{$R *.fmx}
procedure Tform1.DisplayMyMPLabels(
index: integer;
name:
string;value:real);
var
Xstart, ystart, yinc: integer;
begin
//MPLabel[index]:=TLAbel.create(Self);
MPLabel[
index].Position.X:=336;
MPLabel[
index].Position.y:=144+(
index-1)*24;
MPLabel[
index].height:=23;
//MPLabel[index].size.height:=23;
MPLabel[
index].font.size:=10;
//MPLabel[index].size.width:=250;
//MPLabelV[index]:=TLAbel.create(Self);
MPLabelV[
index].Position.X:=336+250;
MPLabelV[
index].Position.y:=144+(
index-1)*24;
MPLabelV[
index].height:=23;
//MPLabelV[index].size.height:=23;
MPLabelV[
index].font.size:=10;
//MPLabelV[index].size.width:=50;
MPLabel[
index].Text:=Format('
%s',[
name]);
MPLabel[
index].visible:=true;
MPLabelV[
index].Text:=Format('
%7.2f mm',[value]);
MPLabelV[
index].visible:=true;
end;
procedure TForm1.FormActivate(Sender: TObject);
var
i: integer;
begin
for i := 1
to 15
do
DisplaymyMPLabels(i,'
NAME ',10.2);
end;
procedure TForm1.FormCreate(Sender: TObject);
var
i: integer;
begin
for i := 1
to 15
do
begin
MPLabel[i]:=TLabel.Create(Application);
MPLabelV[i]:=TLabel.Create(Application);
end;
end;
end.