> 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@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to