Solved

clearing a TImage

Posted on 2003-10-22
4
238 Views
Last Modified: 2010-04-05
hi

i have a TImage Component on my form and i have drawn a circle(Ellipse) on it using this code :

 with image1 do begin
      Canvas.Brush.Color := clRed;
      Canvas.Brush.Style := bsSolid;
      Canvas.Ellipse(0, 0,41,41);
      end;

now i want to clear the TImage Canvas.

how can it be done using code.

pliz help!!!!
0
Comment
Question by:hybridron
4 Comments
 
LVL 27

Expert Comment

by:kretzschmar
ID: 9604489
use

  image1.picture.assign(nil);

meikl ;-)
0
 

Expert Comment

by:DTHLIEM
ID: 9604630
or
   image1.Picture := Nil;
0
 
LVL 8

Accepted Solution

by:
gmayo earned 250 total points
ID: 9604942
or

 with image1 do begin
     Canvas.Brush.Color := clWhite;
     Canvas.Pen.Color := Canvas.Brush.Color;
     Canvas.Rectangle(0, 0, Picture.Width, Picture.Height);
     end;
0
 
LVL 1

Author Comment

by:hybridron
ID: 9609839
thanx a lot guys i finally managed to get the circle to clear out.
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

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…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

747 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