function FindComponent(const AName: string): TComponent;DescriptionFindComponent returns the component in the Components property array with the name that matches the string in the AName parameter. Use FindComponent to determine whether a given component is owned by another.form1.FindComponent('led1') etc
解决方案 »
- 如何实现“打开所在文件夹”,并使文件获得焦点
- 如何让登录数据库时不弹出数据库的认证框,也就是不弹出要求输入数据库名和密码的登录框??
- 菜鸟求教:用参数方式实现客户端查询数据库问题?
- 如何用程序设置(修改)本机的IP地址
- 请教,我有一个toolbar,上面有四个toolbutton,问题!
- 那里有Mac地址输入控件(Delphi)下在?不要CB的
- A very simple question!!
- 请问如何改变Listbox中特定某一项的字体颜色???急!!!
- 今天收到Borland发来的信件,Delphi 7 Studio新鲜出炉!
- 高分寻求判断数据重复性的方法。
- 急救!!!请问:有关于SOCKET通讯的源程序吗?
- 关于toolbar的显示和关闭的问题,答对一定给分
i : integer;
Led : string;
LedList:TList;
begin
LedList:=TStringList.Create;
for i:=1 to 12 do
begin
LedList.Add(Format('LED%d',[i])) //Led='Led1'
end;
for i:=17 to 52 do
begin
LedList.Add(Format('LED%d',[i])) //Led='Led1'
end;
.....
end; 最后得到的就是你想要的Led名字列表!
Use findcomponent(the name of component) or className(FindComponent(the name of component))etc:Tedit(findcomponent('edit1'));
i : integer;
Led : string;
begin
for i:=1 to 12 do
begin
Led:=Format('LED%d',[i]) //Led='Led1'
end;
for i:=17 to 52 do
begin
Led:=Format('LED%d',[i])
end;
..... 你可以这样操作Tlable(led).caption:=''
类似你可以去发挥。