(Components[i] as TControl).enabled:=false 为啥无效?(50分)

  • 主题发起人 主题发起人 wooiguo
  • 开始时间 开始时间
W

wooiguo

Unregistered / Unconfirmed
GUEST, unregistred user!
代码如下:
for i:=0 to Panel1.componentcount-1 do
if Panel1.Components is TControl then
(Panel1.Components as TControl).enabled:=false;
 
把Panel换成form
 
for i:=0 to form1.componentcount-1 do
if form1.Components is TControl then
if (form1.Components as TControl ).Parent = Panel1 then
(form1.Components as TControl ).enabled:=false;
 
接受答案了.
 

Similar threads

S
回复
0
查看
896
SUNSTONE的Delphi笔记
S
S
回复
0
查看
873
SUNSTONE的Delphi笔记
S
S
回复
0
查看
1K
SUNSTONE的Delphi笔记
S
S
回复
0
查看
900
SUNSTONE的Delphi笔记
S
后退
顶部