var iCount:integer;
begin
    for iCount:=0 to frm_companyadd.ComponentCount-1 do
        begin
            if frm_companyadd.Components[iCount].ClassName = 'TEdit' then
            ...... ......    
        end;省略号的地方不知道怎么写了。比如要得清空每个Edit

解决方案 »

  1.   

    TEdit(frm_companyadd.Components[iCount]).test:='';
      

  2.   

    var iCount:integer;
    begin
        for iCount:=0 to frm_companyadd.ComponentCount-1 do
            begin
                if frm_companyadd.Components[iCount].ClassName = 'TEdit' then
               (frm_companyadd.Components[iCount] as TButton).Text := 'abc';
            end;
    end;
      

  3.   

    一楼:你的text打成test了  ^_^二楼:有错误哦!as TButton后是没有TEXT这个属性的,应该是as TEdit 不过同样表示感谢。