Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.


Welcome, Guest
Guest Settings
Help

Thread: TImage assign issue


This question is not answered. Helpful answers available: 2. Correct answers available: 1.


Permlink Replies: 2 - Last Post: Oct 18, 2017 8:19 AM Last Post By: Lawson Lutchman
Lawson Lutchman

Posts: 31
Registered: 8/12/05
TImage assign issue  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 18, 2017 2:15 AM
Hi Forum,

I have 2 panels on the same form, each has an TImage componet, at runtime I would like to copy Image1 from Panel1 to Image2 on Panel2.

I have an Onclick for Image2...

procedure TForm1.Image2Click(Sender: TObject);
begin
Image2.Assign(Image1);
end;

The error I get is cannot assign TImage to TImage.

How can I assign these images to each other at runtime?
Antonio Estevez

Posts: 665
Registered: 4/12/00
Re: TImage assign issue  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 18, 2017 5:10 AM   in response to: Lawson Lutchman in response to: Lawson Lutchman
El 18/10/2017 a las 11:15, Lawson Lutchman escribió:
Hi Forum,

I have 2 panels on the same form, each has an TImage componet, at runtime I would like to copy Image1 from Panel1 to Image2 on Panel2.

I have an Onclick for Image2...

procedure TForm1.Image2Click(Sender: TObject);
begin
Image2.Assign(Image1);
end;

The error I get is cannot assign TImage to TImage.

How can I assign these images to each other at runtime?

Try this:

	Image2.Picture:= Image1.Picture;
Lawson Lutchman

Posts: 31
Registered: 8/12/05
Re: TImage assign issue  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 18, 2017 8:19 AM   in response to: Antonio Estevez in response to: Antonio Estevez
Thanks for the tip Antonio...

Antonio Estevez wrote:
El 18/10/2017 a las 11:15, Lawson Lutchman escribió:
Hi Forum,

I have 2 panels on the same form, each has an TImage componet, at runtime I would like to copy Image1 from Panel1 to Image2 on Panel2.

I have an Onclick for Image2...

procedure TForm1.Image2Click(Sender: TObject);
begin
Image2.Assign(Image1);
end;

The error I get is cannot assign TImage to TImage.

How can I assign these images to each other at runtime?

Try this:

	Image2.Picture:= Image1.Picture;
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02