for i:=1 to 10 do
begin
  table1.append;
  table1.fieldByname('a').AsString :=
    (FindComponent('Edit'+IntToStr(i)) as TEdit).text;
  table1.post;
end;

解决方案 »

  1.   

    to deepbluesea
    FindComponent是什么意思,sorry,这台机器里暂时没有Delphi
      

  2.   

    按deepbluesea(deepbluesea)的方法做吧,没错
      

  3.   


     table1.append;
    for i:=1 to 10 do
      table1.fields[i].AsString :=
        (FindComponent('Edit'+IntToStr(i)) as TEdit).text;
      table1.post;
      

  4.   

    Indicates whether a given component is owned by the component.function FindComponent(const AName: string): TComponent;DescriptionFindComponent returns the component in the Components property array with the name that matches the string in the AName parameter. Use FindComponent to determine whether a given component is owned by another.
      

  5.   

    每个有child的控件多可以用FindComponent是查找它的child.
      

  6.   

    table1.append;for i:=1 to 10 do  table1.fields[i].AsString :=    (FindComponent('Edit'+IntToStr(i)) as TEdit).text;table1.post;
      

  7.   

    FindComponent是按照控件(name属性)的名字查找控件。