Hi all
I have build a custom class that inherits ControlCollection
I have overriden the Add method as follows
public void Add(ArthurControls.ArhturPanel.BaseArhturPanelItem value)
{
base.Add (value);
}
where value is a usercontrol
when i add some controls to the controlcollection i get the following error
"Value cannot be null.\r\nParameter name: array"
this is the stacktrace
" at System.Array.IndexOf(Array array, Object value, Int32 startIndex, Int32 count)\r\n at System.Windows.Forms.ControlCollection.GetChildIndex(Control child, Boolean throwException)\r\n at System.Windows.Forms.ControlCollection.GetChildIndex(Control child)\r\n at System.Windows.Forms.Control.UpdateChildZOrder(Control ctl)\r\n
Does anybody has any idea why this is happening
Thnx!!!!!

inherit ControlCollection
heavenly
If you just want a collection of controls that you can store your user controls in, you might consider generating one with the Strongly-Typed collection generator tool available for download on www.gotdotnet.com. Just go to the User Samples area, and search for "Collection Generator." You can have it generate a strongly typed collection of type 'Control' which you can add to your project. You won't even need to overload the Add method for your derived class like you did above... since your derived class inherits from Control.
Bri