1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
|
TImage *Checked = new TImage (NULL);
TRect R;
if(ACol == 8 && StringGrid->Cells[0][0] != "vide" && StringGrid->Cells[0][0] != "")
{
StringGrid->Canvas->Brush->Color = clWhite;
StringGrid->Canvas->Font->Color = clWhite;
StringGrid->Canvas->FillRect(Rect);
R.Left = -2;
R.Right = Rect.Right - Rect.Left - 2;
R.Top = -2;
R.Bottom = Rect.Bottom - Rect.Top - 2;
if(StringGrid->Cells[ACol][ARow] == 1)
Checked->Picture->Bitmap= pImageOK;
else if(StringGrid->Cells[ACol][ARow] == 0)
Checked->Picture->Bitmap = pImageNO;
StringGrid->Canvas->CopyRect(Rect, Checked->Picture->Bitmap->Canvas, R);
}
pImageOK et pImageNO sont actuellement des TBitmapImage chargés depuis une DLL |
Partager