for I := 0 to ComponentCount - 1 do
  if Components[I] is TEdit then
    TEdit(Components[I]).Text := '这是你说的?';

解决方案 »

  1.   

    for i:=0 to form1.ComponentCount-1 do begin
      if form1.Components[i] is TBUtton 
         then TButton(form1.Components[i]).Caption := 'OK';
    end; //遍历窗体上的button,使他们的caption为……或者
    var arr : array[0..5] of TButton
    begin
      for i:=0 to 5 do begin
        arr[i] := TButton.Create(Self);
        arr[i].Parent := Self;
        arr[i].left := i+10;
        ....
      end; //动态创建按钮数组;
    end;
      

  2.   

    for i:=1 to **.count  ---- ???ControlCount吧
                          ---- 这里还要增加一个按件类型识别判断
    if tedit(sender).***  ---- 使用Tag值
      

  3.   

    for I := 0 to ComponentCount - 1 do
      if Components[I] is TButton then
        TButton(Components[I]).Caption := 'Hello';