CalcTitleAttributes abrush not setting background color
I am using this event on a wwdbgrid to set a specific column to clyellow however it isn't changing the color. I can set the afont.color and the text will change, but abrush.color := clYellow has no effect. Are there any known issues regarding this?
I'm using Delphi Rio 10.3 update 3. Infopower 4K Rio.
-
Official comment
I'm sorry that this message was not showing up in our group.
I think you need to use the OnCalcCellColors instead. I think currently the OnCalcTitleAttributes is fired after the background is already painted.
procedure TBtnGridForm.wwDBGrid1CalcCellColors(Sender: TObject; Field: TField;
State: TGridDrawState; Highlight: Boolean; AFont: TFont; ABrush: TBrush);
begin
if TwwDBGrid(Sender).CalcCellRow=0 then
abrush.Color:= clyellow;
end;
-RoyComment actions
Please sign in to leave a comment.
Comments
1 comment