I'am using this code to place an image to various cells, But the cells with images always flickering
thanks for any help
procedure TForm1.DBAdvGrid2GetCellColor(Sender: TObject; ARow, ACol: Integer;
AState: TGridDrawState; ABrush: TBrush; AFont: TFont);
var verschleiert : boolean;
begin
verschleiert:=true;
if (ARow > 0) and (acol>0) then
if ((pos('Sa',dbadvgrid2.Columns[acol].Header)<>0) or (pos('So',dbadvgrid2.Columns[acol].Header)<>0)) then
begin
ABrush.Color:=clgray;
afont.Color:=clWhite;
end
else
if (length(dbadvgrid2.Columns[acol].Header)>17) then
begin
ABrush.Color:=clsilver;
afont.Color:=clWhite;
end
else
if (pos(dbadvgrid2.Cells[acol,arow],'USKHDWEBQFRO')<>0) and verschleiert then
begin
dbadvgrid2.AddImageIdx(acol, arow, 0, haCenter, vaCenter);
end
else
if dbadvgrid2.Cells[acol,arow]='U' then
begin
ABrush.Color:=clPurple;
afont.Color:=clPurple;
end
else
if dbadvgrid2.Cells[acol,arow]='S' then
begin
ABrush.Color:=clgreen;
afont.Color:=clgreen;
end
else .....