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
380
Replace and insert forms on an UltratabbedMdiManager
posted

I want to add several forms to an UltraTabbedMdiManager.

On activating a form, I want this form to be replaced with an alternative form (that has different functionality).  Is this possible? (i.e. to replace a form with another form)

If this is not possible I plan to add the forms on load, then on activating a form, I will create a new form (with the enhanced functionality) and dispose of the original form.  Is it possible to insert the new  form (to maintain the order of the mdi tabs, so it gives the appearance that it has been replaced), or to specify a new index for a form in the mdi tab order?

Many Thanks

Parents
No Data
Reply
  • 44743
    posted

    I have not tried this, but I have a feeling you may run into problem with this approach. I would instead recommend a different approach. Take the controls from your "enhanced functionality" Form and instead add them to a UserControl. At run-time, add empty Forms as Mdi children. When the child Form is selected, create and add an instance of the UserControl to the empty Form. Set its Dock property to Fill so it occupies the entire Form area. This way you don't have to deal with switching out Forms.

Children