I've searched everywhere, but for the past five years the consistent answer seems to be that ToolTipTextFormatted is the only way to get any control over how the UltraToolbarsManager's tooltips are presented. This is quite a pain.
Here's my use case: we have a multi-lingual application, and depending on the language, we need to use different fonts. In Chinese Traditional we want to use MingLiU — this works everywhere, except for the tooltips. The Western characters look pretty ugly to our (Western) eyes in MingLiU (crappy serifs!), but the priority is on the Chinese glyphs, and some of them are completely unreadable in the tooltips (see edited screenshot).
Is there a way to at least set the tooltip font (family and size) at the UltraToolbarsManager level?
TIA,Hans
Hello,
I am glad to hear that my solution works for you. Please let me know if you need my further assistance on this matter.
Thank you for using Infragistics Components.
Hi Hristo,
Thank you for the video and the sample code -- this works beautifully!
I didn't recognize .7z as an archive file extension, sorry about causing you additional work.
Our application is completely dynamic, no designer is involved; our application supports multiple brands, i.e. different feature sets, and the tools are created programmatically based on data read from various configuration files. We also support on-the-fly language switching using our own localization feature.
Best,Hans
Hello ,
Based on your response it seems that you were not able to see my sample and you haven’t download and test it (139922.7z below my signature ). So I’ve captured small video which demonstrates how to test my sample and it is available on the following link:
https://www.youtube.com/watch?v=3NLojP9l--Q&feature=youtu.be
Exposing of a signal property is not the best approach for a windows programmers since text appearance like Tooltip is controlled by the Operation system and they might be customized by the user of that OS.
For the ToolTipTextFormatted you could use the designer in order to see how your formatted text would appears, and moreover for the different languages you could use the designer in order to add different formatting without writing a line of code. It is localization feature of .NET.
I hope that this will helps you.
Hi Hristo
Thank you for your reply.
>> The best and the easiest way to achieve your goal is to use ToolTipTextFormatted
That statement is being repeated over and over in the forum, but that doesn't necessarily make it true. Please explain in what way having to mess with each and everyone of all kinds of different tool instances is "better" and "easier" than having a single TooltipAppearance property (or an exposed UltraTooltipsManager) in the UltraToolbarsManager, which would automatically guarantee that all ToolBase tooltips look the same. The flexibility is nice if you need one (or every) tooltip to look different, but in the normal case it's a pain.
Also, I'm unsure how font name resolution and size are handled in the ToolTipTextFormatted. Having to manually map System.Drawing.Font to Infragistics.Win.FontData is inconvenient enough -- having to map it to HTML is downright painful.
>> I’ve implemented this suggestion is a very base sample in order to demonstrate you this approach, in order to avoid duplication of Tooltips I’ve set ToolTipDisplayStyle to None.
Should I see sample code somewhere? This would be very helpful because I'm not sure which objects you target in your verbal description.
Thank you for your help!Hans
The best and the easiest way to achieve your goal is to use ToolTipTextFormatted, however there is an another approach. You should Implement IToolTipItem interface which is responsible for the Tooltip for Infragistics Components and to assign an instance of this implementation to the UIElement which should display your tooltip. I’ve implemented this suggestion is a very base sample in order to demonstrate you this approach, in order to avoid duplication of Tooltips I’ve set ToolTipDisplayStyle to None.