I successfully achieved usage of some controls inside a ControlContainerTool placed in toolbars.
I would handle tooltip displaying over the ControlContainerTool toolbar instance, instead of displaying tooltips over the controls hosted by the ControlContainerTool.
Should I use the ToolTipText property of SharedProps of the ControlContainerTool? I tried such property, but it seems not to work. The contained control flood almost entirely the ControlContainerTool area and you can't see any tooltip.
The display of a tooltip is triggered by a MouseHover event, and when you use a control container, the tool never receives the message (since there is another control in 'front' of it), which is why the tooltip does not display.
You could use our UltraToolTipManager component to show a tooltip for the control that you have assigned to the container tool, like so:
// Create an UltraToolTipManager instance Infragistics.Win.UltraWinToolTip.UltraToolTipManager ttManager = new Infragistics.Win.UltraWinToolTip.UltraToolTipManager(this.components); // Create an UltraToolTipInfo instance Infragistics.Win.UltraWinToolTip.UltraToolTipInfo ttInfo = new Infragistics.Win.UltraWinToolTip.UltraToolTipInfo(); // Set the UltraToolTipInfo properties ttInfo.ToolTipText = "ToolTip"; // Associate the control with the UltraToolTipInfo ttManager.SetUltraToolTip(control, ttInfo);
Thank you so much for your reply. I implemented it in my code and it works like a charm.
There's only one cosmetic issue I wasn't able to match for the appearance of the WinToolbars' ButtonTool tooltip and the tooltip managed for the ControlContainerTool hosted control. My app is using AppStyling for UltraWinToolbarsManager and I would expect the same appearance with this code:
Me.UltraTooltipManager1.UseAppStyling = True Me.UltraTooltipManager1.StyleSetName = Me.UltraToolbarsManager1.StyleSetName Me.UltraTooltipManager1.StyleLibraryName = Me.UltraToolbarsManager1.StyleLibraryName Me.UltraTooltipManager1.ToolTipTextStyle = ToolTipTextStyle.Default Me.UltraTooltipManager1.DisplayStyle = Infragistics.Win.ToolTipDisplayStyle.Standard
The tooltip rectangle area, the used font and the cell padding don't match perfectly.