Solved

clearing a TImage

Posted on 2003-10-22
4
239 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Filemaker 14 vs Delphi Embarcadero 7 186
Delphi Form ownership 4 73
URL for downloading Google Chrome for Win XP 2 122
Installshield for Embarcadero EX 10.1 Berlin 4 20
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…
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…
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
Internet Business Fax to Email Made Easy - With  eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, f…

920 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

16 Experts available now in Live!

Get 1:1 Help Now