var
a: TComponent;for i := 1 to n do
begin
a := FindComponent(Format('label%d', [i]));
if (a <> nil) and (a is TLabel) then
TLabel(a).Caption := listbox1.Items[i - 1];
end;
a: TComponent;for i := 1 to n do
begin
a := FindComponent(Format('label%d', [i]));
if (a <> nil) and (a is TLabel) then
TLabel(a).Caption := listbox1.Items[i - 1];
end;
ComponentName[i]:= listbox1.items[i];
TLabel(FindComponent('label'+InttoStr(ii))).Caption := listbox1.items[ii-1];