Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- unit Unit1;
- {$mode objfpc}{$H+}
- interface
- uses
- Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls;
- type
- { TForm1 }
- niz = array[1..100] of TLabel;
- TForm1 = class(TForm)
- Button1: TButton;
- Edit1: TEdit;
- procedure Button1Click(Sender: TObject);
- private
- { private declarations }
- public
- { public declarations }
- end;
- var
- Form1: TForm1;
- implementation
- {$R *.lfm}
- { TForm1 }
- procedure TForm1.Button1Click(Sender: TObject);
- var
- i, n,er:integer;
- labele : TLabel;
- begin
- val(Edit1.Text, n, er);
- for i:=1 to n do
- begin
- labele := TLabel.Create(Form1);
- labele.name := 'labela'+IntToStr(i);
- labele.Caption:= 'Hello World!';
- labele.Visible:=True;
- labele.Top:=100;
- labele.Left:=i*120;
- labele.Parent := Form1;
- end;
- end;
- end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement