по аналогии с этой темой
procedure TForm1.StringGrid1DrawColumnCell(Sender: TObject;
const Canvas: TCanvas; const Column: TColumn; const Bounds: TRectF;
const Row: Integer; const Value: TValue; const State: TGridDrawStates);
var
aTextRect: TRectF;
aTextLayout: TTextLayout;
begin
aTextRect := Bounds;
aTextRect.Right := Round(aTextRect.Right) + 2; // убираем вертикальную линию сетки
aTextRect.Bottom := Round(aTextRect.Bottom) - 1; // оставляем горизонтальную
Canvas.FillRect(aTextRect, 0, 0, AllCorners, 1);
if StringGrid1.Selected = Row then
Canvas.ClearRect(aTextRect, claAquamarine); // красим выделенную строку
aTextLayout := TTextLayoutManager.DefaultTextLayout.Create;
try
aTextLayout.BeginUpdate;
try
aTextLayout.WordWrap := False;
aTextLayout.Opacity := Column.AbsoluteOpacity;
aTextLayout.Trimming := TTextTrimming.Character;
aTextLayout.TopLeft := aTextRect.TopLeft;
aTextLayout.Text := Value.ToString;
aTextLayout.MaxSize := PointF(aTextRect.Width, aTextRect.Height);
if Column.Index = 0 then
begin
aTextLayout.Font.Family := 'Times New Roman'; // меняем шрифт колонки
aTextLayout.Color := claBrown;
end;
if Column.Index = 1 then
begin
aTextLayout.Font.Size := 18; // меняем шрифт другой колонки
aTextLayout.Font.Style := [TFontStyle.fsBold];
end;
finally
aTextLayout.EndUpdate;
end;
aTextLayout.RenderLayout(Canvas);
finally
aTextLayout.Free;
end;
end;