Setting font color in getdrawstate event
Demeter László

Hi Nicholas,
Can You please tell me how to avoid this error:
[BCC32 Error] Unit1.cpp(168): E2522 Non-const function _fastcall TFont::SetColor(const TColor) called for const object
The event is like:
void __fastcall TForm1::pgTestGetDrawState(TProfGrid *Sender, int ACol, int ARow, TGridDrawState &AState, TColor &AColor, const TFont *AFont)
{
if(exp1)
AFont->Color = COLOR_DEFINE;
}
Thank You
-Demeter