I want have to have a single imageList used by multiple forms in a project. That is to say, multiple controls use the same image list.
Note: Ideally multiple projects in a single solution will use the same image list – but I don't want to ask too much of Microsoft at once.
Some controls are listview, some are treeviews, some are custom controls, some are controls that do custom paint cycles.
How can I point multiple ListViews and TreeViews to the same image list component?
Some of the issues involved are:
- Where do I put the image list component? It has to sit on some sort of form
- How do I convince the IDE to show imagelist controls in the "SmallImageList" that are on different forms as the listview?
- If I instead construct the imagelist at runtime, how do I design the images that appear in the image list?
Note: This was easy in Delphi. You'd drop an ImageList component as you normally do, and it just appeared in the list of available image lists under the "SmallImageList" property in the Properties window.
Note: It's okay to say that it can't be done in Visual Studio. If the answer is that it cannot be done then that will be the accepted answer.