Hi.
I'm developing a MDI application using a UltraTabbedMdi and UltraToolbars, allowing parent form to merge ribbons.
Everytime I show a new form I call this function to show the child form ribbon:
private void ActivatesRibbonTab(string tabName)
{ UltraToolbarsManager activeChildManager = this.toolsManager.ActiveMdiChildManager; if (activeChildManager != null) { if (activeChildManager.Ribbon.Tabs.Contains(tabName)) { toolsManager.Ribbon.SelectedTab = activeChildManager.Ribbon.Tabs[tabName].AttachedParentTab; } } }
Ok, this works fine, but, I'd like to select it everytime the child form becomes active. I've tried to activate it in the Enter & Activate child events and in the TabSelected event of UltraTabbedMdi control. But I can't get it, due sometimes the ribbon has not been active yet.
Whic event should I use to get the ribbon selected everytime the user select one mdi tab?
Thanks.
Hello,
Please handle the main form's MDIChildActivate event and handle your function there.
Let me know if you have any questions regarding this matter.
Hi Michael, thanks for you help.
No, when MDIChildActivate is fired, child ribbon has not been assigned yet.