|
|
|
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, | |
Dialogs, StdCtrls, Grids; | |
TForm1 = class(TForm) | |
StringGrid2: TStringGrid; | |
Edit1: TEdit; | |
Edit2: TEdit; | |
Label1: TLabel; | |
Label2: TLabel; | |
Button1: TButton; | |
StringGrid1: TStringGrid; | |
Button3: TButton; | |
Button4: TButton; | |
procedure Button3Click(Sender: TObject); | |
procedure Button4Click(Sender: TObject); | |
procedure Button1Click(Sender: TObject); | |
procedure Edit1Change(Sender: TObject); | |
{ Private declarations } | |
{ Public declarations } | |
Form1: TForm1; | |
procedure TForm1.Button3Click(Sender: TObject); | |
procedure TForm1.Button4Click(Sender: TObject); | |
for k:=0 to strtoint(edit1.Text) do | |
stringgrid1.Cells[0,k]:=inttostr(random(50)-10); | |
procedure TForm1.Button1Click(Sender: TObject); | |
for k:=0 to strtoint(edit1.Text) do | |
if stringgrid1.Cells[0,k]<>'' then | |
g:=strtoint(stringgrid1.Cells[0,k]); | |
stringgrid2.Cells[0,k]:=inttostr(g); | |
stringgrid1.Cells[0,k]:='ERROR'; | |
procedure TForm1.Edit1Change(Sender: TObject); | |