- Just too complex to allow wrapping AND <br> tags.
- Compromise is to not worry about "maximum length" if "<br>" is used.
- Assumption is that if you took the time to put in a <br> you expect
that to be where (and only where) the line breaks are and also to define
the width of the tooltip
- adds a thin border around the tooltip text.
if (ttext.contains("<br>"))
{
if (ttext.contains("<br>"))
{
- String[] htmllines = ttext.split("<br>");
- for (String line : htmllines)
- {
- maxLengthExceeded = line.length() > 60;
- if (maxLengthExceeded)
- {
- break;
- }
- }
+ maxLengthExceeded = false;
+// String[] htmllines = ttext.split("<br>");
+// for (String line : htmllines)
+// {
+// maxLengthExceeded = line.length() > 60;
+// if (maxLengthExceeded)
+// {
+// break;
+// }
+// }
return (enclose ? "<html>" : "")
// BH 2018
return (enclose ? "<html>" : "")
// BH 2018
- + "<style> div.ttip {width:350px;white-space:pre-wrap;padding:2px;overflow-wrap:break-word;}</style><div class=\"ttip\">"
+ + "<style> div.ttip {width:350px;white-space:pre-wrap;margin:2px;overflow-wrap:break-word;}</style><div class=\"ttip\">"
// + "<style> p.ttip {width:350px;margin:-14px 0px -14px 0px;padding:2px;overflow-wrap:break-word;}"
// + "</style><p class=\"ttip\">"
+ ttext
// + "<style> p.ttip {width:350px;margin:-14px 0px -14px 0px;padding:2px;overflow-wrap:break-word;}"
// + "</style><p class=\"ttip\">"
+ ttext