Re: Insert an image into a cell in TStringGrid


2003-08-11 11:56:42 PM
delphi203
Quote
I want to insert a bitmap into a cell
First, you should use TDrawGrid as you can place text and images to it as
well;
var
MyImage: TImage;
procedure Form1.MyDrawGridDrawCell(Sender: TObject; Col, Row: Longint;
Rect: TRect; State: TGridDrawState);
var
ImgRect: TRect;
begin
.......... .......... ............
dgdMain.Canvas.Draw(ImgRect.Left, ImgRect.Top,
MyImage.Picture.Graphic);
........ ......... ............
end;