I'm looking for a way to change the color of the lines in the header of an FMX grid. I have the following code to change the color of the lines in the grid itself, using an interposer:
type
TStringGrid = class(FMX.Grid.TStringGrid)
protected
procedure ApplyStyle; override;
end;
TForm1 = class(TForm)
StringGrid1: TStringGrid;
StringColumn1: TStringColumn;
StringColumn2: TStringColumn;
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.fmx}
{ TStringGrid }
procedure TStringGrid.ApplyStyle;
var
LLineFill: TBrushObject;
begin
if FindStyleResource<TBrushObject>('LineFill', LLineFill) then
LLineFill.Brush.Color := TAlphaColorRec.Orange;
inherited;
end;
Which results in this:
But as can be seen, that just changes the color of the grid lines, not the header lines (which are still grey). Someone else suggested modifying the headeritemstyle
(in code or at design-time) however that's a TButtonStyleObject
, so there doesn't seem to be any relevant properties for that.
Any suggestions?