Mega Code Archive

 
Categories / Delphi / Graphic
 

Put bitmap to StringGrid

Title: Put bitmap to StringGrid Use StrechDraw property of the StringGrid.Canvas and don't forget to free the bitmap. procedure TForm1.Button1Click(Sender: TObject); var Bitmap: TBitmap; begin Bitmap:=TBitmap.Create; Bitmap.LoadFromFile('factory.bmp'); StringGrid1.Canvas.StretchDraw(StringGrid1.CellRect(1,1),Bitmap); Bitmap.Free; end;