Solved

how to put picture to on cell in drawgrid?

Posted on 1998-09-07
1
307 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

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

Suggested Solutions

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

777 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