Hi everybody,I got stucked with a singular graphic problem. Normally, using UltraTabbedMdiManager, when I add a new child (creating a child form then calling its Show method) this will be shown in a new tab that became active showing the contained child.Recently I'm developing a little bit complex rich client that require to open a mdi child from a dialog box.That's possible and almost all works good except for activation of the tab. It opens the new tab but leaves it not selected, I mean the currently selected tab before to open the interesting one, remain the active tab.Everything else seems to works, in fact I can click the new tab and it will became active and correctly shows its child.I tried lots of workarounds with no success, manually setting active tab (method Activate), selected tab (property SelectedTab) and so on.Please can anybody help me find a good workaround?I'm going to attach a sample to show this odd behavior.Run the form application, then an automatic child will appear.GoodClick on the ribbon button "Open child form" and a second child will be loaded, tab will be added and shown.GoodNow click the ribbon button called "Open Dialog", a dialog will be shown; it's a form with a single button.GoodClick that button and a third child will be added, but surprise: the tab will remain unselected until you manually click on it.Any help will be appreciated.Thank in advanceGianni
Hi Hristo,
you perfectly got the point. Your suggestion is good and with this I can solve the problem.Thank you very much.Gianni
Hello,
Thank you for the provided sample. As far as I understand your issue is that the child form that you have added trough your DialogForm, was not activated when dialog was closed. Sins you display your DialogForm as Dialog, execution of the code of your Form1 stops until you close DialogForm, this allows you to activate the latest added MdiChild form after dialog was closed. For example you could use code like:
this.MdiChildren[this.MdiChildren.Count() - 1].Activate();
On line 39 of your Form1 class, in other words Button2_ToolClick will look like:
void Button2_ToolClick(object sender, Infragistics.Win.UltraWinToolbars.ToolClickEventArgs e)
{
new DialogForm().ShowDialog();
}
Please let me know if you have any further questions.