ASE Home Page Products Download Purchase Support About ASE
ChartDirector General
Forum HomeForum Home   SearchSearch

Message ListMessage List     Post MessagePost Message

  How to create multi-line tool tip
Posted by Ting Kah Hing on Jul-02-2009 14:47
Hi CD team
I would like to know whether it is possible to create a tool tip to show multi-line information, such as {x} on the 1st line and {value} on the 2nd line. Thanks in advance
PS:
I really like Chartdirector a lot.

  Re: How to create multi-line tool tip
Posted by Peter Kwan on Jul-03-2009 00:34
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