Solved

how to put picture to on cell in drawgrid?

Posted on 1998-09-07
1
299 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
Comment Utility
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

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

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…
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

763 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

11 Experts available now in Live!

Get 1:1 Help Now