unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, Grids, ValEdit, ExtCtrls, ButtonGroup, StdCtrls, CategoryButtons,
ImgList, ComCtrls, XPMan,ShellApi;
type
TForm1 =
class(TForm)
Button1: TButton;
Button2: TButton;
procedure FormCreate(Sender: TObject);
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
edits: TEdit;
editlist :
array[1..10]
of TEdit;
i:Integer;
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
begin
Inc(i);
//setlength(editlist,i);
editlist[i] := TEdit.Create(self);
editlist[i].Parent := self;
editlist[i].Align := alTop;
editlist[i].Visible := true;
end;
procedure TForm1.FormCreate(Sender: TObject);
begin
i := 0;
end;
end.