if Assigned(FindComponent(Format('e_%d', [x]))) then
  TEdit(Assigned(FindComponent(Format('e_%d', [x])))).Text := '是这样吗?';

解决方案 »

  1.   

    zswangII(伴水II)(需要充充电)谢谢你老兄!怎么给你分?
      

  2.   

    程序执行到
    TEdit(Assigned(FindComponent(Format('e_%d',  [x])))).text:='0';
    产生报错 不知道什么原因呀
    procedure Tfrm_cxcklx.sb_bcClick(Sender: TObject);
    var x,row,cul:Integer;
    begin
       for row:=0 to 25 do
          begin
            for cul:=0 to 7 do
              begin
                 x:=8*row+(cul+1);
                 if  Assigned(FindComponent(Format('e_%d',  [x])))  then
                     TEdit(Assigned(FindComponent(Format('e_%d',  [x])))).text:='0';
                 showmessage(TEdit(Assigned(FindComponent(Format('e_%d',  [x])))).text);
              end;
          end;
    end;这是我程序代码
      

  3.   

    zswangII(伴水II)(需要充充电)问题解决了 找到的控件AS一下就行了 怎么给你分?