--> Command how to clear (clear) image. | Delphi Tips Trick

For Newbie

Tuesday, 15 November 2011

Command how to clear (clear) image.

| Tuesday, 15 November 2011


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;

Related Posts

No comments: