Problem Source: http://www.cnblogs.com/del/archive/2008/03/06/1094289.html#2023057
In C: \ temp \, prepare three images: 1.bmp, 2.bmp, 3.bmp, and then:
unit Unit1;interfaceuses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, Grids;type TForm1 = class(TForm) DrawGrid1: TDrawGrid; procedure FormCreate(Sender: TObject); procedure DrawGrid1DrawCell(Sender: TObject; ACol, ARow: Integer; Rect: TRect; State: TGridDrawState); procedure FormDestroy(Sender: TObject); end;var Form1: TForm1;implementation{$R *.dfm}var bits: array[0..2] of TBitmap;procedure TForm1.FormCreate(Sender: TObject);var i: Integer;begin ChDir('c:\Temp\'); for i := Low(bits) to High(bits) do begin bits[i] := TBitmap.Create; bits[i].LoadFromFile(IntToStr(i+1) + '.bmp'); end; DrawGrid1.FixedRows := 0; DrawGrid1.FixedCols := 0; DrawGrid1.RowCount := 1; DrawGrid1.ColCount := 3; DrawGrid1.DefaultRowHeight := bits[0].Height; DrawGrid1.DefaultColWidth := bits[0].Width;end;procedure TForm1.DrawGrid1DrawCell(Sender: TObject; ACol, ARow: Integer; Rect: TRect; State: TGridDrawState);var r: TRect;begin if (ARow = 0) and (ACol >= Low(bits)) and (ACol