This is one of a few methods of exporting a ListView and the ability to import it also. This method goes a little further, it will export/import all of the following:
1. ListItems and their SubItems to include forecolor, boldness, icons for both the main item & its subitems (ReportIcon property), tooltips, tags, all properties.
2. ColumnHeaders to include their formatting and icons
3. ListView appearance to include borders, background picture, colors, font, and all style attributes (i.e., checkboxes, gridlines, etc)
4. Any of the ImageLists used by the Listview, including image list properties like image width/height, useMaskColor, etc. Also included will be any keys/tags used by any of the images.
You can choose to import/export parts/combinations of the above listing. The example project is very basic and not well documented, but the code is not that complex either, with the exception of extracting picture objects for saving to file and converting their file contents to stdPicture objects for importing into an imagelist control.
Feedback welcomed. I have not nearly tested all the possible combinations of properties to be imported/exported, so a couple of bugs may exist.
After a fair tryout by you guys/gals, if there is an interest in a similar class to manage TreeView controls, I will consider that too. Also considering adding Import/Export to/from XML functionality
Last edited by LaVolpe; Feb 14th, 2009 at 09:11 AM.
Insomnia is just a byproduct of, "It can't be done"