delphi中控件数组批量赋值


本文整理自网络,侵删。

 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 idhttp post中文的问题

Delphi 另类计算程序代码运行耗时

Delphi 条件编译语法 $ifdef $else $endif

strpcopy 将字符串复制到字符数组中

Delphi中把执行文件内存中的dll的代码全部保存下来

Delphi twebbrowser 响应回车键(ewb响应正常,无需额外代码)

Delphi指针的定义和取值

tidtcpserver控件中文指南

Delphi record,两种声明方式

Delphi中调用api函数exitwindowsex可以实现系统的关机,注销,和重启

更多相关阅读请进入《Delphi》频道 >>



打赏

取消

感谢您的支持,我会继续努力的!

扫码支持
扫码打赏,您说多少就多少

打开支付宝扫一扫,即可进行扫码打赏哦

分享从这里开始,精彩与您同在

评论

管理员已关闭评论功能...