procedure TForm2.StringGrid1DrawCell(Sender: TObject; ACol, ARow: Integer; Rect: TRect; State: TGridDrawState); begin if ARow=StringGrid1.Row then begin StringGrid1.Canvas.Brush.Color:=clred; StringGrid1.Canvas.FillRect(Rect); StringGrid1.Canvas.TextOut(Rect.left,Rect.top,StringGrid1.Cells[Acol,Arow]); end;end;
procedure TForm1.StringGrid1DrawCell(Sender: TObject; ACol, ARow: Integer; Rect: TRect; State: TGridDrawState); begin if (acol=1) and (arow=2) then begin StringGrid1.Canvas.Font.Color:=clred; StringGrid1.Canvas.TextRect(Rect,Rect.Left,Rect.Top,StringGrid1.Cells[Acol,arow]); end; end;
Rect: TRect; State: TGridDrawState);
begin
if ARow=StringGrid1.Row then
begin
StringGrid1.Canvas.Brush.Color:=clred;
StringGrid1.Canvas.FillRect(Rect);
StringGrid1.Canvas.TextOut(Rect.left,Rect.top,StringGrid1.Cells[Acol,Arow]);
end;end;
Rect: TRect; State: TGridDrawState);
begin
if (acol=1) and (arow=2) then
begin
StringGrid1.Canvas.Font.Color:=clred;
StringGrid1.Canvas.TextRect(Rect,Rect.Left,Rect.Top,StringGrid1.Cells[Acol,arow]);
end;
end;