Hi there,
I am trying to show a ToolTip on a ButtonTool. So I add the ButtonTool to the Tools of the Toolbar like toolBase = ultraToolbarsManager1.Toolbars[0].Tools.AddTool("SOMEKEY");
I ensure ToolTips are showing with:
ultraToolbarsManager1.ShowToolTips = true; ultraToolbarsManager1.ToolTipDisplayStyle = Infragistics.Win.UltraWinToolbars.ToolTipDisplayStyle.Formatted;
And set the ToolTipText of the Button with
toolBase.SharedProps.ToolTipText = "SOME TEXT";
The Property ShouldDisplayToolTip is still false. On which properties the depends. What do I have to do to show the ToolTip of the ButtonTool. And can it be displayed when the ButtonTool.SharedProps.Enabled = false?
Hi, I tried like you suggested but the result is not fulfilling my expectations.
The popUpMenueTools which are created dynamically
PopupMenuTool popUp = new PopupMenuTool(row.CHILDID.ToString()); popUp.Settings.ShowToolTips = DefaultableBoolean.True;
The ultraToolBarManager
The Event as you suggested
private void ultraToolbarsManager1_MouseEnterElement(object sender, UIElementEventArgs e) { DefaultableBoolean result = e.Element.Enabled ? DefaultableBoolean.False : DefaultableBoolean.True; this.ultraToolbarsManager1.ShowToolTips = !e.Element.Enabled; this.ultraToolbarsManager1.MenuSettings.ShowToolTips = result; if (e.Element.Enabled) e.Element.ToolTipItem = null; }
The tooltips are still displayed when the ButtonTools are allowed. Also i found that opening a popupmenu with a disabled tooltip the tooötip first is not displayed until i enter it after I entered an allowed one in the same PopUp menu. And yeah I want this just only for ButtonTools because I do not have any other tools in the toolbar. Thanks in advance
Hi Gavin.
Do you want to turn off tooltips on all disabled tools or only ButtonTools? If it is for all tools, the simplest solution would be to handle the UltraToolbarsManager's MouseEnterElement event, and set the ShowTooltips properties (on the UltraToolbarsManager and MenuSettings) based on e.Element.Enabled. This would require you to use the MenuSettings on the UltraToolbarsManager instead of the Settings on each individual PopupMenuTool:
private void ultraToolbarsManager1_MouseEnterElement(object sender, UIElementEventArgs e) {
this.ultraToolbarsManager1.ShowToolTips = e.Element.Enabled;
this.ultraToolbarsManager1.MenuSettings.ShowToolTips = e.Element.Enabled ? DefaultableBoolean.True : DefaultableBoolean.False;
}
If you only want to do this for ButtonTools, it gets a bit more complex. Let me know if this is the case, and I'll work on the more complex solution.
Thanks,
Chris
Hi,
so I managed to show the tooltips for the ButtonTools with:
PopupMenuTool popUp = new PopupMenuTool("SOMEKEY"); popUp.Settings.ShowToolTips = DefaultableBoolean.True;
The last question now is, how to disable all the default tooltips for each ButtonTool
I tried to set ToolTipDisplayStyle in the UltraToolBarsManager as suggested in http://ko.infragistics.com/community/forums/t/63466.aspxBut no ToolTip is displayed anymore
Hello Gavin,
In order for tooltips to be displayed for child tools of PopupMenus, the ShowToolTips property needs to be set to True on either the UltraToolbarsManager's MenuSettings or each individual PopupMenu's Settings object. This should get your tooltips showing appropriately.
Let me know if you have any questions.
I forgot to mention that the ButtonControl is inside a PopupMenuTool. If this is important