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
575
How to activate the ribbon of a MDI child form when becomes active?
posted

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.

Parents
No Data
Reply
  • 29105
    Offline posted

    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.

Children