Hello,
is it possible to get a line break in a tooltip?
thanks
Michael
You can use formatted tooltip text with HTML tags such as:
<p style="width: 200px; margin-left: 10px; margin-right: 10px;...">Your text</p>
Hi Michael,
ToolTipManager does not currently expose a maximum width. But it's not a bad idea. You should submit a feature request to Infragistics:
http://devcenter.infragistics.com/Protected/RequestFeature.aspx
Hi sarmakns1,
thank you for your answer, first it works not in my case because the text comes from a Resource-File
This is my sourcecode
..
ResourceManager rm = new ResourceManager("WindowsApplication5.MyResource", typeof(Form1).Assembly);
ultraToolTip.ToolTipText = rm.GetString("test");
The Tooltipp looks like: "This is a \n test.".
The \n is ignoring when I take the String from the Resourcefile.
If I use the following line
String text = rm.GetString("test").Replace("\\n","\n");
it works fine. But is there not a better way e. g. a maximum-width in tooltipmanager or so?
Thanks,
Hi Micheal
Try something like this
"Type: " + strProgramType + "\n" +
"Episode: " + strEpisodeName + "\n" +
"Duration:\n" + tsDuration.Hours + " Hour(s)\n" + tsDuration.Minutes + " Minutes(s) ";
You can also use Environmwnt.NewLine instead of the escape character '\n' in the string