Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Add TImage (Dynamic Way)

Status
Not open for further replies.

ZeeNer

Programmer
Jun 2, 2002
38
CA
Hi all,
i want to create (and add) some TImage component in my application but i want to do it inside a procedure (Exemple : before the execution the application had 4 Timage, and after the execution of this procedure the application had 24 TImage) , does anyone here can help me?

Sorry for my english guy ;)
 
hi,

this example creates one Timage on a form.

uses ExtCtrls

procedure TForm1.Button1Click(Sender: TObject);
var
img1: Timage;
begin
img1 := Timage.Create(Form1);
img1.Parent := Form1;
img1.Top := 10;
img1.Left := 300;
img1.Picture.LoadFromFile('example.bmp');
end;

replace 'example.bmp' with a valid image name.

Steph [bigglasses]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top