using endline with tooltip text

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
heijho01
Posts: 12
Joined: Thu Jul 17, 2003 2:16 pm

using endline with tooltip text

Post by heijho01 » Fri Feb 13, 2004 10:39 am

Hello,

I'm showing a tooltip when the mouse moves over a Gantt chart item in a Gantt chart. I set this tooltip to a text that tells the user more about that item. Problem is that if the tooltip text is very large, it will fall ofscreen.
Using an endline \n doesn't work. It there a possibility to do this?

Here is my code:

public class MyChartMouseListener implements ChartMouseListener
{
/**
* Event generated when mouse moved over a JFreeChart item
*
* @param event event that was generated
*/
public void chartMouseMoved(ChartMouseEvent event)
{
CategoryItemEntity entity = (CategoryItemEntity) event.getEntity();
if(entity != null)
{
entity.setToolTipText("text");
}
}

Thanks in advance,

Jeroen

Matthias
Posts: 42
Joined: Fri Apr 18, 2003 9:49 am
Location: Germany

Post by Matthias » Tue Feb 17, 2004 3:48 pm


heijho01
Posts: 12
Joined: Thu Jul 17, 2003 2:16 pm

Post by heijho01 » Wed Feb 18, 2004 9:55 am

Html in tooltip text. Pitty I didn't think of that ... used it before with Swing (but in a button).

Anyway, thank you for your reply, it did help me for sure :-)

Locked