C# How to override Fom.Controls collection
Posted on 2010-08-15
I have a custom form component I have written that has a docked panel in the form's body.
When an object is added to the Form.Controls collection it currently adds it to the same collection that contains the panel, what I want is when someone calls Form.Controls.Add(object) it adds the supplied object to the Panel's Controls collection.
I am aware that I could just write Form.Panel.Controls.Add but that defeats what i am trying to accomplish.