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