[fpc-pascal] Using StrindGrid
berna uyanık
bernauyanik at gmail.com
Fri Jan 15 01:49:37 CET 2010
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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20100115/2c670e54/attachment.html>
More information about the fpc-pascal
mailing list