procedure TForm1.StringGrid1DrawCell(Sender: TObject; aCol, aRow: Integer;
Rect: TRect; State: TGridDrawState);
begin
With TStringGrid(Sender),canvas, rect do begin
if (aRow = Row)and(ACol =0) then
Begin
canvas.Pen.color := clRed;
canvas.Polygon([Point(CenterPoint.x,Top),Point(Right,CenterPoint.Y),
Point(CenterPoint.X,Bottom-1)]);
Canvas.Brush.color := clGreen;
Canvas.FloodFill(CenterPoint.X+1,CenterPoint.Y+1,Pen.Color,fsBorder);
end;
end;
end;
procedure TForm1.StringGrid1SelectCell(Sender: TObject; aCol, aRow: Integer;
var CanSelect: Boolean);
begin
with TstringGrid(Sender) do Invalidate; //force an update otherwise it won't paint..
end;