Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Bitmaps in StringGrid

Posted on 1998-10-03
3
Medium Priority
?
394 Views
Last Modified: 2011-09-20
I understand that Bitmaps can be displayed in a cell of a Stringgrid, How ??

i have tried using 'objects' method, but I get an error message that I have not seen in a documentation 'EStringSparseListError'

can anyone suggest some code  ?
0
Comment
Question by:chriseden
[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
3 Comments
 
LVL 8

Accepted Solution

by:
ZifNab earned 210 total points
ID: 1341582
Hi chriseden,

here is the code :

In your StringGrid's OnDrawCell event handler, place some code that resembles:

     with StringGrid1.Canvas do        begin        {...}
        Draw(Rect.Left, Rect.Top, Image1.Picture.Graphic);        {...}
        end;

Regards, Zif.
0
 
LVL 5

Expert Comment

by:scrapdog
ID: 1341583
Maybe this will help???


procedure TForm1.StringGrid1DrawCell(Sender: TObject; Col, Row: Longint;
  Rect: TRect; State: TGridDrawState);
 
begin
  if StringGrid1.Objects[Col,Row] is TImage then begin
    with StringGrid1.Canvas do begin
      Draw(Rect.Left, Rect.Top, (StringGrid1.Objects[col,row] as TImage).Picture.Graphic);        {
    end;

  end;
end;


0
 

Author Comment

by:chriseden
ID: 1341584
Great
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…
Suggested Courses

604 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