Is there a way to set the Tooltip text for the "Minimize Ribbon" Menu item?
Hello,
Please try the following code which uses UltraTooltipManager:
UltraToolTipInfo info = new UltraToolTipInfo(); private void ultraToolbarsManager1_MouseEnterElement(object sender, Infragistics.Win.UIElementEventArgs e) { if (e.Element is TextUIElement && e.Element.Parent is MinimizeRibbonUIElement) { info.ToolTipText = ((TextUIElement)e.Element).Text; ultraToolTipManager1.SetUltraToolTip(this, info); ultraToolTipManager1.ShowToolTip(this); } else ultraToolTipManager1.HideToolTip(); }
Please do not hesitate to contact us if you need any additional assistance.
This did not worked - it does not enter if (e.Element is TextUIElement && e.Element.Parent is MinimizeRibbonUIElement) condition.
It looks like it is barried deeper: (e.Element.Parent.Parent as ToolbarUIElement).ChildElements[0] as ButtonToolUIElement)).Tool.
Still no idea how to get MinimizeRibbonUIElement...
It looks like we have been in some sort of misunderstanding here, please switch the condition with the following one:
if (e.Element is Infragistics.Win.ImageAndTextUIElement.ImageAndTextDependentTextUIElement && e.Element.Parent.Parent is ButtonToolUIElement)
and use the following code in order to remove the default tooltip:
this.ultraToolbarsManager1.Ribbon.TabItemToolbar.Settings.ShowToolTips = Infragistics.Win.DefaultableBoolean.False;
Please feel free to let me know if I misunderstood you or if you have any other questions.
This condition is very generic, i.e. if you add another button tool next to the "Minimize Ribbon" , the condition would be met for it as well. Is there a way to identify "Minimize Ribbon" tool?
I am extending the condition then:
if (e.Element is Infragistics.Win.ImageAndTextUIElement.ImageAndTextDependentTextUIElement && e.Element.Parent.Parent is ButtonToolUIElement && !this.ultraToolbarsManager1.Ribbon.TabItemToolbar.Tools.Contains(((ButtonToolUIElement)e.Element.Parent.Parent).Tool))
Please do not hesitate to contact me if you need any additional assistance.
It seams that this condition matches all other button tools on the toolbar tabs.
It seams though that (ButtonToolUIElement)e.Element.Parent.Parent).Tool.Key for MinimizeRibbonTool is empty. So if I use the everything seams to be working:
if (e.Element is Infragistics.Win.ImageAndTextUIElement.ImageAndTextDependentTextUIElement && e.Element.Parent.Parent is ButtonToolUIElement
&& ((
ButtonToolUIElement)e.Element.Parent.Parent).Tool.Key == string.Empty)
All tools that we add will have the Key property set. The question is is there other build-in tools on the toolbar that will have Key property empty?
This is good. I was searching for other tools like this, which do not have the Key property set and was not able to find such.
Everything seams working fine. Thanks a lot.