Hi Ting Kah Hing,
The tooltips are actually rendered by your GUI framework. So whether the tooltips can contain multiple lines depend on which GUI framework you are using.
For example, in .NET Windows Forms, you can simply insert a new line character ("\\n" in C# and vbLF in VB.NET) to break the tooltip into multiple lines. In Java SWING, you can even use HTML to format the tooltips as per Java SWING standand. In a web page, there is no way in the HTML standard to specify a multiline tooltip. Some browsers support multiple line HTML tooltips by simply inserting linefeed characters in the tooltips, which some browsers do not support it.
If you are on a GUI framework that does not support multiline tooltips (eg. a web page), you would need to handle the "hot spot mouse over" event, and pop up your own small window to emulate the tooltip box. For example, in a web page, you may use Javascript to listen to the mouseover event to pop up a DIV block with multiline text (see the Javascript Clickable Chart sample code for an example on how to attach a mouseover event handler to the hot spots).
If you need further help, please inform me of your programming language and application type (eg. desktop or web?).
Hope this can help.
Regards
Peter Kwan |