unit gauss; interface uses Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls, Grids; type TForm1 = class(TForm) matice: TStringGrid; rozmer: TEdit; b_rozmer: TButton; procedure b_rozmerClick(Sender: TObject); private { Private declarations } public { Public declarations } end; var Form1: TForm1; implementation {$R *.DFM} procedure TForm1.b_rozmerClick(Sender: TObject); begin matice.rowcount = strtoint(rozmer.text); matice.colcount = strtoint(rozmer.text); end; end.