반응형
var
a:TRect;
begin
a:=DrawCell.CellRect( ACol,ARow );
DrawCell.Canvas.Draw(a.left,a.top,Bitmap);
end;
if (ACol =0) and (ARow > 0) and (Cells[0, ARow]<>'') then
begin
Try
CarStateBitmap := TBitmap.Create ;
ImageList1.GetBitmap (StrToInt(Cells[0,ARow]), CarStateBitmap);
Canvas.FillRect (Rect);
nBitmapLeft := Trunc(Rect.Left + ((Rect.Right - Rect.Left)/2) - (CarStateBitmap.Width /2));
Canvas.Draw(nBitmapLeft, Rect.Top+1, CarstateBitmap);
Canvas.Font.Color := clBlue;
Canvas.TextOut( Rect.Left + 1, Rect.Top + 1, Cells[ ACol, ARow ] ); //여기다 적당한 위치로 넣어주시면 되겠져...
finally
CarStateBitmap.Free;
end;
end;
반응형