<div>Hi, </div><div>I started lazarus newly</div><div>Codes that I used is below:</div><div>unit Unit1; <br><br>{$mode objfpc}{$H+}<br><br>interface<br><br>uses<br> Classes, SysUtils, FileUtil, LResources, Forms, Controls, Graphics, Dialogs,<br>
Grids;<br><br>type<br><br> { TForm1 }<br><br> TForm1 = class(TForm)<br> grid1: TStringGrid;<br> procedure FormCreate(Sender: TObject);<br> private<br> { private declarations }<br> public<br> { public declarations }<br>
end; <br><br>var<br> Form1: TForm1; <br><br>implementation<br><br>{ TForm1 }<br><br>procedure TForm1.FormCreate(Sender: TObject);<br>var satir: integer;<br>sutun:integer;<br>begin<br> for sutun:=1 to grid1.ColCount do;<br>
begin<br> grid1.cells[sutun,0]:=chr(64+sutun);<br> end;<br> for satir:=1 to grid1.RowCount do;<br> begin<br> grid1.Cells[0,satir]:=inttostr(satir);<br> end;<br> end;<br><br>initialization<br> {$I unit1.lrs}<br><br>
end.<br></div><div><br></div><div>I wanted to give nembers and letters to row and column sides.</div><div><br></div><div>After I had runned those codes I received "Index Out of range Cell[Col=5 Row=0].</div><div><br>
</div><div>Where is my mistake? </div><div>Thanks for all.</div><div><br></div><div><br></div>