Advertisement
Guest User

Za malog mileta

a guest
Apr 19th, 2015
178
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pascal 0.87 KB | None | 0 0
  1. unit Unit1;
  2.  
  3. {$mode objfpc}{$H+}
  4.  
  5. interface
  6.  
  7. uses
  8.   Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls;
  9.  
  10. type
  11.  
  12.   { TForm1 }
  13.   niz = array[1..100] of TLabel;
  14.  
  15.   TForm1 = class(TForm)
  16.     Button1: TButton;
  17.     Edit1: TEdit;
  18.     procedure Button1Click(Sender: TObject);
  19.   private
  20.     { private declarations }
  21.   public
  22.     { public declarations }
  23.   end;
  24.  
  25. var
  26.   Form1: TForm1;
  27.  
  28. implementation
  29.  
  30. {$R *.lfm}
  31.  
  32. { TForm1 }
  33.  
  34. procedure TForm1.Button1Click(Sender: TObject);
  35. var
  36.    i, n,er:integer;
  37.    labele : TLabel;
  38. begin
  39.   val(Edit1.Text, n, er);
  40.   for i:=1 to n do
  41.   begin
  42.       labele := TLabel.Create(Form1);
  43.       labele.name := 'labela'+IntToStr(i);
  44.       labele.Caption:= 'Hello World!';
  45.       labele.Visible:=True;
  46.       labele.Top:=100;
  47.       labele.Left:=i*120;
  48.       labele.Parent := Form1;
  49.  
  50.   end;
  51. end;
  52.  
  53. end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement