I've created a custom graph control that has a collection of GraphPlots. When adding
the plots at design time, I wanted the name of the GraphPlot to auto increment in the
collection window. Just like when you add controls to a form: i.e. TextBox1, TextBox2, etc.
So in the GraphPlot class, I made it inherit from component and it works. The problem is
when the graph itself is deleted from the form. The GraphPlot objects do not get removed
from the form designer. For example, I add 2 GraphPlots (GraphPlot1 & GraphPlot2), then
I delete the graph from the form. Then I add a graph to the form again and add a GraphPlot.
The first one added starts at 3 (GraphPlot3) because 1 and 2 are still in the form designer code.
My GraphPlotCollection class inherits from collectionbase. I didn't use a type converter
or a collection editor. Didn't need them to make everything work.... almost everything
I couldn't find any good info on this so I figure its time for some help from the experts.
Thanks for any suggestions -
View Complete Post