Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
180
Blank space at the bottom and no Minimum/MaximumSize when in tabbed view
posted
Hello.
  • I have a form that is Mdi container, and has an UltraTabbedMdiManager. Let’s call it MainForm.
  • MainForm has a Property called Tabbed that activates or deactivates the UltraTabbedMdiManager by changing the value of UltraTabbedMdiManager.MdiParent to this or null.
  • MdiChild (which inherits from Windows.Forms.Form) will be the base class of all the children that will be assigned to MainForm.
  • The implementation of MdiChild should include the assignment of the property MdiParent=MainForm.
 My question is: where is the right place in the MdiChild implementation for assigning the MdiParent property? I tried assigning MdiParent in the constructor, before the InitializeComponent. Then I got this unwanted behaviors:
  • When I create a child having MainForm in Tabbed mode, a blank space appeared at the bottom.
  • When changing back from Tabbed to Normal, all the children created while in Tabbed lost the values of MaximumSize and MinimumSize.
Assinging MdiParent in the constructor, but after the InitializeComponent, results in the same behavior because the children are instances of inheritors of MdiChild, and their own InitializeComponent is being invoked after the base constructor.  

Assigning the MdiParent in the OnLoad of the MdiChild will work, but it will force all the controls in the form to load twice.