procedure TForm1.SetEnable(Enable: Boolean);
var
i:Integer;
begin
for i:=0 to Self.ComponentCount-1 do
begin
if Self.Components[i] is TEdit then
(Self.Components[i] as TEdit).Enabled := Enable;
end;
end;请问上面的 self.components[i] 是什么意思,不是数组也能这样用吗.
var
i:Integer;
begin
for i:=0 to Self.ComponentCount-1 do
begin
if Self.Components[i] is TEdit then
(Self.Components[i] as TEdit).Enabled := Enable;
end;
end;请问上面的 self.components[i] 是什么意思,不是数组也能这样用吗.
解决方案 »
- 求2的补数,谁知道?
- 异常处理结构(却不行)
- 〖建议贴〗CSDN使用中的几个不方便的地方〖建议贴〗
- 恳请大家帮忙一下,奇怪的问题??!
- DatabaseName问题
- 导航条
- 投了5分简历,五次面试机会,5次全部通过,现在真的很痛苦~~:)所以散分 !~~~~~
- 我是刚刚学delphi的,想讨论一下dephi的观点
- 怎样把文本(string型)加到richedit的光标(当前输入位置)后?谢谢!!
- ADOTABLE中的MOVEBY(No),是直接移动到指定的记录吗?和 ADOTABLE.RECNO=No一样吗?
- 控制重复录入
- 最近下了个delphi2007,听说出了D7最多人用的就是2007了,求帮助
是循环self窗体(可以是其它容器)上的每一个控件。
Self.Components[i]是第I个索引号的控件。
if Self.Components[i] is TEdit then
是判断索引号为I的控件如果是TEdit then.......
Components 就是一個數組啊。在當前的FORM下繼承自 TComponent 的組件都會進到這個數組中。