Hi - I currently have an application that uses the TabbedMDIManager as well as the Ribbon. I am trying to make the ribbon groups either visible or in-visible depending on which mdichild the user is on. Currently, if the user clicks on the mdichild which makes them visible, I can never make them in-visible until the user closes the application. In runtime, the visible property is being set, but it does not take effect. Is this a bug or intentional because of the Office2007UICompatibilty feature? and is there a way around this? Thanks.
gaxtell,
What version of NetAdvantage for Windows Forms are you using? I created a sample to try to reproduce this behavior but was unable to do so; I handled the UltraTabbedMdiManager's TabActivated event and in it, set a RibbonGroup's Visible property to true or false depending on which tab was activated. I've attached the sample for you to take a look at and compare.
~Kim~
I am using NetAdvantage for Windows Forms version 2009.1.
Also, I believe I failed to mention a couple things which may be the difference. There is only one child form and it has a ribbon that merges in with the parent ribbon. Under certain circumstances the ribbon groups on the child form's ribbon change (from visible to not visible). I do not believe that I can access the data that I need from the parent form's tab activated event. I am trying to take care of this in the form activated event right now within the child form. Any suggestions?
If the ribbons have already been merged, you can access the child RibbonGroups from the parent form. The one issue here is that the keys for child RibbonTabs will have some text pre-pended to it in order to distinguish it from any RibbonTab on the parent that might have the same key. To get around this, you will need to check to see if the RibbonTab's UnderlyingTab property is not null, and then check its key. Your code will look something like this:
foreach (RibbonTab tab in this.ultraToolbarsManager1.Ribbon.Tabs) { if (tab.UnderlyingTab != null && tab.UnderlyingTab.Key == "childTab1") { tab.Groups["ribbonGroup2"].Visible = false; } }
Hope this helps,