I added an event handler for MdiChildActivate in the MDI parent form and tried this code:
The flag was required to fix a stack overflow calling the base method.
toolbarsManager.Ribbon.SelectedTab = parentTab;
This code ran fine and set the SelectedTab to the correct tab, but it wasn't selected in the ribbon. The Home tab remained selected.
I looped through all tabs in another attempt
foreach (RibbonTab tab in toolbarsManager.Ribbon.Tabs){ if (tab.Caption == "MyMdiChildCaption") toolbarsManager.Ribbon.SelectedTab = tab;}
This still didn't select it.
Any help or examples would be appreciated.
Ok, I think I know what the problem might have been. I didn't realize this was being done in the MdiChildActivate handler at first. If you instead override the OnMdiChildActivate method, call the base implementation first (to call all event handlers), then select the merged tab in the parent ribbon, you should have no problem.
Thanks for the quick reply. I was able to work around the problem like this:
Best regards
Make sure you do not have an event handler for BeforeRibbonTabSelected which might be setting e.Cancel to True. If not, it could be a bug and I would recommend submitting the issue to the support group: http://es.infragistics.com/gethelp.