首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > .NET > .NET >

FindComponent用法,用错了?该如何处理

2012-05-29 
FindComponent用法,用错了??Delphi(Pascal) codefor n :1 to 13 - 1 doTEdit(FindComponent(D+intostr(

FindComponent用法,用错了??

Delphi(Pascal) code
for n :=1 to 13 - 1 doTEdit(FindComponent('D'+intostr(n))).Text='';

怎么清空edit不起作用呢?
10几个edit,一个个清。
这样写也太拖拉了。

[解决办法]
for n:=1 to 12 do
(FindComponent('D'+IntToStr(n)) as TEdit).Clear;

热点排行