Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to create multiline tooltip text in GWT

Tags:

gwt

I need to show tool tip text in multiple lines, but setTitle() method in gwt is simply ignoring the \n character?

Is this possible to achieve?

like image 341
Reddy Avatar asked Jun 24 '10 07:06

Reddy


2 Answers

If you are using the title property then it is not possible to have multi line tooltip. This is not a GWT problem, but a browser tooltip implementation/handling issue. If you really need to have a multi line tooltip then use Popup panel or DecoratedPopupPanel.

This will involve a little extra coding than just making a call to setTitle, but as a benefit you get complete control over how the tooltip is presented.

like image 101
Ashwin Prabhu Avatar answered Oct 06 '22 01:10

Ashwin Prabhu


setTitle worked for me if I included a \n as a line separator.

like image 25
Eric Woodruff Avatar answered Oct 06 '22 00:10

Eric Woodruff