Hi !
first sorry for my bad english.
I'm under .Net framewok 3.5 and Winform.
I try to make a custom SplitContainer with multiples child panel. No problems with that.I have created a custom Designer for custom verbs, and now, I want to add default childs panels.So when I drag my custom control on the design surface, he must have 3 default childs, and my problem is here.I tried different things.
-Add the childs in the constructor of my control.This works, but the childs are not selectables in the Form or visibles in "Document outline".
-Add the childs in the override of function "Initialize" of the Designer with a Transaction. Works fine, default childs are created and are selectables in the Form, and are visible in the "Document outline". But I have a strange behavior.
I have a custom SplitContainer with 3 default childs.If I save the project, close the IDE and re-open it, now, I have 6 default childs in my control !!
But another strange thing is that if I close the IDE (with my 6 childs) and re-open it, I have 6 childs and not 12 or 9 !!
I think I can understand why they are recreated each time, but the real question is, what is the best way to add default childs containers to a UserControl the same way as a tabControl or a standard SplitPanel? Here is my classes structure:
MultiSplitterContainer (inherits FlowLayoutPanel)
MultiSplitterPanel (inherits ContainerControl)
MultiSplitterContainer_Designer (inherits ParentControlDesigner)
MultiSplitterPanel_Designer (inherits ScrollableControlDesigner)
thanks in advance for your help (C# or VB, I can read both)!