全部博文(788)
分类:
2008-11-18 14:50:22
基本语句是这样的:
procedure TForm1.StringGrid1DrawCell(Sender: TObject; ACol, ARow: Integer;
Rect: TRect; State: TGridDrawState);
begin
if (ACol = 1) and (ARow = 1) then
begin
StringGrid1.RowHeights[ARow] := Image1.Picture.Graphic.Height;
StringGrid1.ColWidths[ACol] := Image1.Picture.Graphic.Width;
StringGrid1.Canvas.Draw(Rect.Left, Rect.Top, Image1.Picture.Graphic);
end;
end;
完整的功能实现,你自己琢磨一下吧。