[Lazarus] String grids
David Copeland
david.copeland at jsidata.ca
Wed Feb 29 16:12:20 CET 2012
Thanks!
/Dave.
-----Original Message-----
From: kmi at vgdata.dk
Reply-to: Lazarus mailing list <lazarus at lists.lazarus.freepascal.org>
To: Lazarus mailing list <lazarus at lists.lazarus.freepascal.org>
Subject: Re: [Lazarus] String grids
Date: Wed, 29 Feb 2012 16:39:11 +0100 (CET)
> Is there any way (hopefully easy) to change the background colour of a
> specific cell in a stringgrid?
>
procedure TForm1.SG1PrepareCanvas(sender: TObject; aCol, aRow: Integer;
aState: TGridDrawState);
begin
SG1.Canvas.brush.color := clWhite;
If (aCol = 4) and (aRow = 1) Then
SG1.Canvas.Brush.color := clRed;
end;
The PrepareCanvas may be used.
/Kaj
--
_______________________________________________
Lazarus mailing list
Lazarus at lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
--
David Copeland
JSI Data Systems Limited
613-727-9353.
More information about the Lazarus
mailing list