I've created contextual tab groups in the WinToolbarsManager. I'm also creating panes using the WinDockManager. I'd like to have those contextual tabs appear only when a particular pane is active. I thought I had come up with a way to make that happen. I was using the AfterHideFlyout, BeforeShowFlyout, PaneActivate, and PaneDeactivate events on the WinDockManager to control the showing and hiding of the contextual tab groups. However, when a user clicks on a combobox tool that is on the contextual tab, the pane becomes deactivated and the contextual group is hidden. Clicking on checkboxes or buttons is fine. So far, it only appears to be the combobox that deactivates the pane.
Any suggestions?
Thanks in advance.
Editor tools, such as TextBoxTool and ComboBoxTool instances must take focus when they become active, so they can respond to key messages. There is no way around this. What you can do in your application is check the active tool when a pane deactivates. If it is within a contextual tab group that is associated with the pane that was deactviated, delay the hiding of the group. You can determine which contextual tab group the active tool is in with the following (untested) code:
ToolBase activeTool = this.ultraToolbarsManager1.ActiveTool;if(activeTool != null){ RibbonGroup ribbonGroup = activeTool.OwningRibbonGroup; if(ribbonGroup != null) { ContextualTabGroup tabGroup = ribbonGroup.Tab.ContextualTabGroup; if(tabGroup != null) { //... } }}