本文整理自网络,侵删。
procedure TForm1.Button1Click(Sender: TObject);
var
i: integer;
begin
for i:= 1 to 6 do
begin
TLabel(FindComponent('Label' + IntToStr(i))).Caption := '我是'+inttostr(i)+'号';
//TEdit(FindComponent('Edit' + IntToStr(i))).Caption := '我是'+inttostr(i)+'号';
end;
end;
这样能够
相关阅读 >>
Delphi中使用goo.gl(google的缩短url服务)api
monthoftheyear:取得一个tdatetime变量的月份在年度中的索引
更多相关阅读请进入《Delphi》频道 >>