Einzelnen Beitrag anzeigen

skunker
(Gast)

n/a Beiträge
 
#19

Re: Auf Komponenten zugreifen

  Alt 27. Mai 2006, 03:05
sorry für die späte Antwort. Hier der komplette Sourcecode:

Delphi-Quellcode:
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.
  Mit Zitat antworten Zitat