Solved

how to put picture to on cell in drawgrid?

Posted on 1998-09-07
1
320 Views
Last Modified: 2010-04-06
I can not put my picture to one cell in drawgrid?
0
Comment
Question by:tanad
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Enroll in June's Course of the Month

June's Course of the Month is now available! Every 10 seconds, a consumer gets hit with ransomware. Refresh your knowledge of ransomware best practices by enrolling in this month's complimentary course for Premium Members, Team Accounts, and Qualified Experts.

Question has a verified solution.

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

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…
In this video, viewers are given an introduction to using the Windows 10 Snipping Tool, how to quickly locate it when it's needed and also how make it always available with a single click of a mouse button, by pinning it to the Desktop Task Bar. Int…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …

691 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