procedure TForm1.Button2Click(sender:TObject);
var
bmp:TBitmap;
rect:Trect;
i,j:integer;
begin
bmp:=TBitmap.Create;
bmp.LoadFromFile('c:\abc.bmp');
for i:=1 to DrawGrid1.RowCount-1 do
for j:=1 to DrawGrid1.ColCount-1 do
begin
rect:=DrawGrid1.CellRect(j,i);
DrawGrid1.Canvas.Draw(rect.Left,rect.Top,bmp);
end;
end;
var
bmp:TBitmap;
rect:Trect;
i,j:integer;
begin
bmp:=TBitmap.Create;
bmp.LoadFromFile('c:\abc.bmp');
for i:=1 to DrawGrid1.RowCount-1 do
for j:=1 to DrawGrid1.ColCount-1 do
begin
rect:=DrawGrid1.CellRect(j,i);
DrawGrid1.Canvas.Draw(rect.Left,rect.Top,bmp);
end;
end;
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货