Cell Coloring
Posted: Wed Dec 13, 2017 3:40 pm
The getting started documentation alludes to individual cell coloring but doesn't give any code specifics. How do I change the color of a specific cell using Delphi?
Steema Software - Customer Support Forums
https://407832.verdetrade-hk.tech/support/
https://407832.verdetrade-hk.tech/support/viewtopic.php?f=21&t=16757
Code: Select all
TeeGrid1.Columns[2].OnPaint:=GridOnPaintColumn;
Code: Select all
procedure TFormGridDataset.GridOnPaintColumn(const Sender:TColumn; var AData:TRenderData; var DefaultPaint:Boolean);
begin
if AData.Row=1 then
with (Sender.Render as TTextRender) do
begin
Format.Brush.Visible:=True;
Format.Brush.Color:=clRed;
Paint(AData);
end
else
DefaultPaint:=True;
end;