先定义好每个label 的tag
for i:=0 to componentcount-1 do
begin
if tcomponent is tlabel then
if (tcomponent as tlabel).tag=fieldbyname('').asinteger then
(tcomponent as tlabel).caption
end;
for I := Form1.ComponentCount - 1 downto 0 do
begin
if Component.ClassName='TLabel' then begin
//query your label caption
//set label caption;
end;
end;