Thanks! /Dave.
-----Original Message----- From: [email protected] Reply-to: Lazarus mailing list <[email protected]> To: Lazarus mailing list <[email protected]> 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 [email protected] http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus -- David Copeland JSI Data Systems Limited 613-727-9353. -- _______________________________________________ Lazarus mailing list [email protected] http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
