Hi, I need programmatically to activate a tab in a child ribbon in a UltraToolbarsManager control based on Infragistics 2008 Vol 1 using the Key value of the tab to reference my tab to activate.
Thanks in advance.
Luca
If you are just aksing how to select a ribbon tab in a toolbars manager based on the key, you can use code similar to this:
this.ultraToolbarsManager1.Ribbon.SelectedTab = this.ultraToolbarsManager1.Ribbon.Tabs[ "RibbonTabKey" ];
If, on the other hand, you are asking how to select an mdi merged child ribbon tab in the parent manager, then you need to first find the parent tab hosting the child tab, then select that:
UltraToolbarsManager activeChildManager = this.ultraToolbarsManager1.ActiveMdiChildManager;
if ( activeChildManager == null ) return;
RibbonTab childTab = activeChildManager.Ribbon.Tabs[ "RibbonTabKey" ];RibbonTab parentTab = childTab.AttachedParentTab;
if ( parentTab == null ) return;
activeChildManager.Ribbon.SelectedTab = parentTab;
Is it possible to explain how to get this to work but from the Child form? This works on the FormA, but if the form loses focus then is in focus again, the tab will need to reopen again.
this.ultraToolbarsManager1.Ribbon.SelectedTab = parentTab;