When I want to set a certain TDBGrid-cell to a certain color I use
e.g.
DBGrid->Canvas->Brush->Color=DBGRIDCOLOR_SUCCESS;
DBGrid->Canvas->FillRect(Rect);
DBGrid->Canvas->TextOut(Rect.Left+2, Rect.Top+2, Field->AsString);
in the event
TDBGrid::OnDrawDataCell()
Unfortunately this does not only has impact on the color, but also on
the cell-content: So e.g. the currency is not displayed with two
digits behind the '.' if they are 0, etc. (Removing the
TextOut()-function leaves the cell empty)
What can I do to set another background, but leave the cell-text
untouched?
Thank you,
Michael