Is it possible to specify a tooltip for each ListToolItem in a ListTool?
I can't see any obvious way of doing this.
Thanks, I imagine that would work, unfortunately the architecture of my application makes it sort of difficult to handle that event in the right place (it's a CAB application). Therefore it seemed easier for me to use lots of ButtonTools rather than a ListTool.
Hello Alex,
I am just checking about the progress of this issue. Did you solve your issue accordingly to the information that I provided you? Did you test the sample I have sent to you?
Let me know if you need any further assistance.
Thank you for using Infragistics Components.
I had misunderstood your question first time.
The answer of your question is:
All tools in UltraToolbarsManger has a property SharedProps.ToolTipText and .SharedProps.ToolTipTitle where you could determine the TooltipText which will show. When you use PopupMenuTool, if you want to display tooltip on its child elements (the elements in popup menu), you should set .Settings.ShowToolTips = DefaultableBoolean.True;. ListToolItems are not inheriting it from ToolBase, and they didn't have SharedProps.ToolTipText and .SharedProps.ToolTipTitle. You could determine tooltip text on a whole ListTool, which mean that tooltip text of the ListTool will be displayed for all ListToolItem in ListTool. If you want to display different TooltipText for each ListToolItem in ListTool, you could achieve this by handling the UltraToolbarsManager_MouseEnterElement event and write there the following lines:
TextUIElement text = (TextUIElement)e.Element.GetDescendant(typeof(TextUIElement));
if (text != null)
{
UltraToolTipInfo toolTipInfo = this.ultraToolTipManager1.GetUltraToolTip(e.Element.Control);
switch (text.Text)
case "WithOutDefault Tooltip":
toolTipInfo.ToolTipText = text.Text;
break;
case "WithOutDefault Tooltip1":
default:
toolTipInfo.ToolTipText = "";
}
ultraToolTipManager1.ShowToolTip(e.Element.Control);
To clarify using of TooltipText with ToolbarsManager I have created a simple sample.
Please look at the sample and let me know if you have any further questions.
Maybe I'm missing something but my question had nothing to do with UltraListView. It's in the WinToolbars forum, and I refer to ListTool and ListToolItem.
ListToolItem allows you to specify several things that apply to just that item in the list tool, but there's nothing for tooltip. Can you suggest a way to achieve this? I'm thinking I could forget about ListTool and just add ButtonTools in a loop as they allow me to specify a tooltip.
UltraListView automatically displays TooltipText of the items, so what way to customize the tooltip of the items to handle _ToolTipDisplaying event and add the following line for the items:
e.ToolTipText = "Your Text Here";
Also you could get the current Item on which the mouse is positioned and set the tooltip for it taking it form Item property of the event args of that event.
Let me know if you have any further questions