cyotek / imagelistview

Automatically exported from code.google.com/p/imagelistview
4 stars 0 forks source link

item.clone() #109

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Hi

I tried to use the clone-method of an item from one ImageListView to another.

However.....the item itself was cloned, but it seems that the image is not 
cloned.

Can u confirm that problem or maybe i did something wrong.....

I use the latest version of ImageListView.

With Kind Regards

Heino

Original issue reported on code.google.com by heino.nu...@telia.com on 15 Oct 2010 at 4:02

GoogleCodeExporter commented 9 years ago
Sorry...just discovered that its not latest version.

I use version 9.1

Heino

Original comment by heino.nu...@telia.com on 15 Oct 2010 at 4:05

GoogleCodeExporter commented 9 years ago
Hi Heino,

This is by design. Thumbnail images are not persistent. They are managed by the 
control and may even be disposed when they are not displayed. If you want to 
transfer items  between two instances of the control and you want to keep the 
thumbnails, you can work around this issue with something like this:

ImageListView itemCopy = item.Clone();
Image img = item.ThumbnailImage;

imageListView2.Items.Add(itemCopy.Filename, img);

Regards,
Ozgur

Original comment by oozcitak on 19 Oct 2010 at 10:19

GoogleCodeExporter commented 9 years ago
Sorry, I just realized that above wouldn't work. A new Add overload is needed. 
I'll address this in the next update.

Original comment by oozcitak on 19 Oct 2010 at 10:21

GoogleCodeExporter commented 9 years ago

Original comment by oozcitak on 19 Oct 2010 at 11:48

GoogleCodeExporter commented 9 years ago
This issue was closed by revision r543.

Original comment by oozcitak on 20 Oct 2010 at 9:36

GoogleCodeExporter commented 9 years ago
Cloning an item should now clone the item thumbnail if it was created by the 
time the item is cloned.

Original comment by oozcitak on 20 Oct 2010 at 9:50