Page 1 of 1

Tool tips do not work in IE7

Posted: Mon Jul 07, 2008 1:40 pm
by 15046191
I have been unable to get tooltips working in IE7 (using .Tools.Add tcMarksTip), whereas they work fine in IE6.
Are there any known issues/workarounds for this?

Posted: Mon Jul 07, 2008 1:49 pm
by narcis
Hi DMSTL,

This is most likely the same problem as described here. I'll send you an e-mail with the example mentioned on this thread.

IE7 Tooltip

Posted: Mon Jul 07, 2008 3:34 pm
by 15046191
Thanks,

I had to change:
TChart1.Tools.Items(0).asAnnotation.Left = X
TChart1.Tools.Items(0).asAnnotation.Top = Y

to:

TChart1.Tools.Items(0).asAnnotation.Shape.Left = X
TChart1.Tools.Items(0).asAnnotation.Shape.Top = Y

to get it to work as it was throwing an error.

The problem I have now is that the annotation doesn't automatically wrap like a tooltip and as the chart is in a nested frame most of it disappears behind one of the other frames when it is a long string. I have tried setting TChart1.Tools.Items(0).asAnnotation.Width but that causes IE to crash. I can't see any other way to change this short of inserting vbcrlf's into the string to be displayed.

How can I change the height and width of the annotation box and force the text to wrap within it?

Posted: Tue Jul 08, 2008 8:01 am
by narcis
Hi DMSTL,

MarkTips tool uses windows hints, Annotation tools don't and therefore they are clipped by the browser window. The only solution is, when calculating the Annotation position, check if its Left coordinate plus its width is greater than chart's width. If so you could make a multiple line annotation tool.

Annotation width

Posted: Tue Jul 08, 2008 8:26 am
by 15046191
Please could you give me an example of how to do that?
With my annotation the width is always (nearly) the same as the left position of the shape but negative.
e.g.
TChart1.Tools.Items(annotationToolIndex).asAnnotation.Shape.Left = 181
TChart1.Tools.Items(annotationToolIndex).asAnnotation.Width = -180

TChart1.Canvas.Width = 812

The annotation text is clipped in the above example

Posted: Tue Jul 15, 2008 8:24 am
by narcis
Hi DMSTL,

Ok, I'll send you an example.