For Newbie

Tuesday, 15 November 2011

Command how to clear (clear) image.



Give the command picture: = nil in TImage
example:
procedure TForm1.Button1Click (Sender: TObject);
begin
   Image1.Picture: = nil;
end;

Example # 2:
procedure TForm1.Button1Click (Sender: TObject);
begin
   if OpenDialog1.Execute then
   begin
     Image1.Picture.LoadFromFile (OpenDialog1.FileName);
   end;
end;

procedure TForm1.Button2Click (Sender: TObject);
begin
   Image1.Picture: = nil;
end;

Share on Facebook
Share on Twitter
Share on Google+

Related : Command how to clear (clear) image.