Hello,
I've activated autotooltip for the buttons in my ribbonbar. But the autotooltip can not take acount of the translation like the button text.
It should display the same text as the button, doesn't it ?
You can see in my attach photo, the button is in French, but the tooltip is in english.
Thank you by advance.
4 Answers, 1 is accepted
Following the provided information, I was unable to reproduce the issue you are facing. Please refer to the below screenshot illustrating the behavior on my end with the specified version:
I have attached my sample project. Feel free to modify it in a way to reproduce the experienced issue and get back to me with it so I can investigate the precise case. Thank you in advance.
Note that the RadRibbonBar.ToolTipTextNeeded event is an appropriate place to customize the tool-tip text as well in order to display the desired tool-tip.
I am looking forward to your reply.
Regards,
Dess | Tech Support Engineer, Sr.
Progress Telerik
Hello, Dess
Thank you for your reply.
I've tried your demo. In your demo, it works well if autotooltip is enabled in the program.
But if I set autotooltip = true only in designer time, it won't work.
Please download the demo that I modified to reproduce the issue:
https://www.dropbox.com/s/nmyqtq47c1m2gw4/Modified_RibbonButtonsTooltips.rar?dl=0
Regards,
Hello, Dess
I've found something new:
In designer time, if I enable the autotooltip (true), TooltipText will be filled automatically by the button name (only in the default language) in the Form.resx. The system haven't filled the TooltipText in the other resource file, like Form.fr.resx. That's the reason the tooltip is always in English.
It is strange that autotooltip can work without TooltipText in program.
I am looking forward for your help.
Thank you by advance.
Note that the Text property is localizable, but the ToolTipText is not. If you leave the ToolTipText empty, it will extract the respective Text dynamically considering the language at run time. However, if you explicitly set the ToolTipText property, the specified text will be shown as tool-tip no matter the language. Since the ToolTipText is not localizable, the obtained behavior is expected.
The possible solution that I can suggest is to handle the RadRibbonBar.ToolTipTextNeeded event and set the ToolTipText to he current RadButtonElement.Text.
private
void
radRibbonBar1_ToolTipTextNeeded(
object
sender, Telerik.WinControls.ToolTipTextNeededEventArgs e)
{
RadButtonElement btn = sender
as
RadButtonElement;
if
(btn !=
null
)
{
e.ToolTipText = btn.Text;
}
}
Should you have further questions please let me know.
Regards,
Dess | Tech Support Engineer, Sr.
Progress Telerik