CalcTitleAttributes abrush not setting background color

Comments

1 comment

  • Official comment
    Roy Woll

    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;

    -Roy
    Comment actions Permalink

Please sign in to leave a comment.

Powered by Zendesk