Solved

how to put picture to on cell in drawgrid?

Posted on 1998-09-07
1
303 Views
Last Modified: 2010-04-06
I can not put my picture to one cell in drawgrid?
0
Comment
Question by:tanad
1 Comment
 
LVL 10

Accepted Solution

by:
viktornet earned 20 total points
ID: 1338966
Here is a simple example that draws a bimtpa in the first col,row
--------
implementation

{$R *.DFM}
var
  BMP : TBitmap;
procedure TForm1.DGDrawCell(Sender: TObject; Col, Row: Integer;
  Rect: TRect; State: TGridDrawState);
begin
  if (col = 1)and(row = 1) then
    DG.Canvas.Draw(Rect.Left + 2, Rect.Top + 2, Bmp);
end;
procedure TForm1.FormCreate(Sender: TObject);
begin
  Bmp := TBitmap.Create;
  bmp.loadfromfile('E:\My Bmps\checked.bmp');
end;
procedure TForm1.FormClose(Sender: TObject; var Action: TCloseAction);
begin
  bmp.free;
end;
--------------
Regards,
Viktor Ivanov
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
In this video I am going to show you how to back up and restore Office 365 mailboxes using CodeTwo Backup for Office 365. Learn more about the tool used in this video here: http://www.codetwo.com/backup-for-office-365/ (http://www.codetwo.com/ba…
Internet Business Fax to Email Made Easy - With  eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, f…

863 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now