G
Guest
I have a user control from a 3rd party that I want to make sure is at the 0
index of my form's Controls ControlCollection. To accomplish this I've tried
catching the ControlAdded event from the Controls object and then if the
control being added is of the right type, i do a:
Controls.SetChildIndex(e.Control, 0);
this does move the control to the 0 index after the call, but at some point
after this, the form is moving it to the end of the collection. How can I
ensure that the control is in the 0 index?
(Also I can't make the call to SetChildIndex after calling Form.Add(control)
because the control adds and removes itseslf from the collection based on
it's state)
index of my form's Controls ControlCollection. To accomplish this I've tried
catching the ControlAdded event from the Controls object and then if the
control being added is of the right type, i do a:
Controls.SetChildIndex(e.Control, 0);
this does move the control to the 0 index after the call, but at some point
after this, the form is moving it to the end of the collection. How can I
ensure that the control is in the 0 index?
(Also I can't make the call to SetChildIndex after calling Form.Add(control)
because the control adds and removes itseslf from the collection based on
it's state)