Solved

clearing a TImage

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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
There's a multitude of different network monitoring solutions out there, and you're probably wondering what makes NetCrunch so special. It's completely agentless, but does let you create an agent, if you desire. It offers powerful scalability …
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

707 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