Hi,
I'm using the new Infragistics 2015 UltraTreePrintDocument class for printing a treeview but all the images in my treeview are not taken into account when printing.
Someone can help me for include these images in my final print ?
Hello,
How are you adding your images? I attempted to reproduce this in a small sample (attached), and the images appeared correctly in the print preview. Are you able to reproduce this issue in a sample? If so, please attach it here so I can assist you in finding out why the image doesn't appear.
If you have a sample, but would prefer not to upload it on the forum, let me know and I will make a private support case available to you.
Thanks for the response Mike,
It seems to be the same in my code for adding an image.
Il will look further in my program to see where can be the problem.
I'll let you know.
Regards
Hi Mike,
I have found the problem.For memory optimisation in our program, all the images are loaded one time in the ultraTree images list.It was the way used to get the instance of the image in the list which was wrong.In method InitTree(), you can see the two programming ways: the first without printing and the correction with image printing.Do you think I can use this correction or it exists also a simplied way to do the same ?
Okay, this appears to be a bug in the UltraTreePrintDocument. When you print (or show the PrintPreview) the UltraTreePrintDocument clones the tree control. This copy of the tree is used for printing. It does this so that you can modify the cloned control for printing without affecting the on-screen tree.
What's happening here is that the cloning process is not copying the ImageList into the clone.
So the cloned nodes in the tree are pointing to an index in the ImageList for an image, but the ImageList isn't there.
I'll write this up as a bug so we can get it fixed in a future release. But for now, the easiest way for you to work around it would be to set the ImageList on the cloned tree yourself:
void ultraTreePrintDocument1_InitializeTree(object sender, Infragistics.Win.UltraWinTree.Printing.InitializeTreeEventArgs e) { e.Control.ImageList = this.ultraTreePrintDocument1.Tree.ImageList; }
Thank you for the help.
I will do as you point it out pending the future correction.
To ensure that this issue receives attention, I have logged this behavior in our internal tracking system with a Development ID of 203509. The next step will be for a developer to review my investigation and confirm my findings or to offer a fix, or other resolution.
I will leave this case open and update you with any new information after the review. You can also continue to send updates to this case at any time.
You can view the status of the development issue connected to this case by selecting the "Development Issues" tab when viewing this case on the web site.
Please let me know if you need more information.