unit Unit1;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls, ExtCtrls;

type
  TForm1 = class(TForm)
    Panel1: TPanel;
    Edit1: TEdit;
    Edit2: TEdit;
    Edit3: TEdit;
    Edit4: TEdit;
    Edit5: TEdit;
    Edit6: TEdit;
    Button1: TButton;
    Button2: TButton;
    procedure Button1Click(Sender: TObject);
    procedure Button2Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.Button1Click(Sender: TObject);
var i:integer;
begin
  for i:=0 to Panel1.ControlCount-1 do (Panel1.Controls[i] as TEdit).Text:='0';
end;

procedure TForm1.Button2Click(Sender: TObject);
var i:integer;
begin
    for i:=0 to ControlCount-1 do
    if Controls[i] is TEdit then
      (Controls[i] as TEdit).Text:='0';
end;

end.
