W wilsonyun Unregistered / Unconfirmed GUEST, unregistred user! 2002-09-26 #1 如何通过循环使form上的所有控件的enabled属性为false或true? Thanks!
C citybug Unregistered / Unconfirmed GUEST, unregistred user! 2002-09-26 #2 for i:=0 to componentscount-1 do begin if components is Tedit then Tedit(components).enabled:=false; if components is Tcombobox then Tcombobox(components).enabled:=false; .... end;
for i:=0 to componentscount-1 do begin if components is Tedit then Tedit(components).enabled:=false; if components is Tcombobox then Tcombobox(components).enabled:=false; .... end;
W w12345678 Unregistered / Unconfirmed GUEST, unregistred user! 2002-09-26 #3 何必这么麻烦呢,把所有控件放到一个panel上,需要的时候设panel的enable属性为true或 false岂不更爽
W WebExplorer Unregistered / Unconfirmed GUEST, unregistred user! 2002-09-26 #4 不可能按citybug的做,如果我我控件类型多了饿,不累死? 这样 for i:=0 to ControlCount-1 do Controls.Enable:=false; 从Control继承下来的都有Enable属性,而Component却不一定
不可能按citybug的做,如果我我控件类型多了饿,不累死? 这样 for i:=0 to ControlCount-1 do Controls.Enable:=false; 从Control继承下来的都有Enable属性,而Component却不一定
F FLYINGFDK11 Unregistered / Unconfirmed GUEST, unregistred user! 2002-09-26 #5 WebExplorer 说的对,可以用control做,但我以前好象是用form名.control For I := 0 to Form1. ControlCount-1 do Controls.Enable:=false; 不用Form名倒是没试过,下次试试
WebExplorer 说的对,可以用control做,但我以前好象是用form名.control For I := 0 to Form1. ControlCount-1 do Controls.Enable:=false; 不用Form名倒是没试过,下次试试
W WebExplorer Unregistered / Unconfirmed GUEST, unregistred user! 2002-09-26 #6 to flylngfdk11: For I := 0 to Form1. ControlCount-1 do Controls.Enable:=false; //这里不也没有Form1, 不用Form名倒是没试过,下次试试
to flylngfdk11: For I := 0 to Form1. ControlCount-1 do Controls.Enable:=false; //这里不也没有Form1, 不用Form名倒是没试过,下次试试
P pengjinlongex Unregistered / Unconfirmed GUEST, unregistred user! 2002-09-26 #7 按WebExplorer做可以,但有多层控件容器时,其功能可达到,但下层控件的显示颜色 还是不理想,还是亮色