if (ARow != 0){ if (CheckBox5->Checked == true) { if ( StringGrid1->Cells[4][ARow] == "Emergency") { StringGrid1->Canvas->Brush->Color = StringToColor(Colors_mes->color1); StringGrid1->Canvas->Font->Color = StringToColor(Colors_mes->text1); } //............... } int y=Rect.top+(Rect.Height()-StringGrid1->Canvas->TextHeight(StringGrid1->Cells[ACol][ARow]))/2; StringGrid1->Canvas->FillRect(Rect); StringGrid1->Canvas->TextOutA(Rect.Left+2, y, StringGrid1->Cells[ACol][ARow]);}
StringGrid1->Canvas->Brush->Color = clBlue;
StringGrid1->Brush->Color = clBlue;
if(StringGrid1->Row == ARow) StringGrid1->Canvas->Brush->Color = clBlue; else StringGrid1->Canvas->Brush->Color = clRed;