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
40
UltraTabbedMdiManager overlapping tab forms and forms shift down on new tab creation
posted

We are using a UltraTabbedMdiManager for a C# winform application. Each tab is added one at a time and displays a unique form. The tab panel is nested within its parent form. We are experiencing two issues related to new tab creation.

Issue #1: On adding a new tab the entire tab plane shifts down exposing a strip at the top of the parent form (Mdi container), just below its title bar. When clicking on another tab or elsewhere on the parent form, the tab plane reverts to its original position. This strip only appears on creating a new tab and disappears as soon as the focus is lost (by clicking elsewhere). It also occurs only every second tab that is generated which suggests an activation focus issue on new tabs. The problem does not occur when clicking between already generated tabs or when removing tabs. 

I have found a work around for this issue: After the creation of the tab and its form, iterate through all the tabs in the mdi manager and disable them. This iteration is then immediately repeated with enabling all the tabs. The new tab is then reactived. These steps force a loss and then regain of focus and then activation of the tab (N.B. without activation the previous tab will be active). The following is a (verbose) piece of my code which does this operation:

var activeTab = MdiTabManager.ActiveTab;
foreach (var tabgroup in MdiTabManager.TabGroups)
{
      foreach (var tab in tabgroup.Tabs)
      {
           tab.Form.Enabled = false;
      }
}

foreach (var tabgroup in MdiTabManager.TabGroups)
{
          foreach (var tab in tabgroup.Tabs)
          {
                  tab.Form.Enabled = true;
         }
}
activeTab.Activate();

Issue #2: On the generation of some new tabs. The form shifts down and the controls at the top of the previous tab are displayed (but are inactive) on the new tab. It is as if they were superimposed onto the new tab. A similar work around like before resolves this issue; I had read this on another infragistics forum post. However this time the tab's form ShowInTaskbar property is set to false and then true (after iterating through all the mdi managers tabs).

It is possible that the two issues are related. Do you know if these are known issues? If so, has it been solved in later versions?

Just for further information about our application. The form, that contains the mdi manager, is launched from our application's main form. This main form also uses a UltraTabbedMdiManager but does have these issues. Therefore are there known problems with having more than one mdi manager in the same project or solution ?

Here are our environment details:

Infragistics v14.1, .Net v4.7, Visual Studio 2017 Enterprise, C# 7.0, WinForms

Thanks

Andrew

Parents
  • 40
    Offline posted

    In fact the workaround(s) have side-effects if relying on the Application.OpenForms collection. Calling ShowInTaskbar will effectively remove the open forms from this collection (a known Windows form bug as described here https://stackoverflow.com/questions/3751554/application-openforms-count-0-always). Unfortunately my application relies on this collection. So my workaround is not applicable to my application. However, it could be useful to other designs not relying on the OpernForms collection.

Reply Children