Page 1 of 1

TextBox Tool?

Posted: Tue Apr 12, 2005 7:32 pm
by 8437945
Any chance for the availability of a TextBox tool, "similar" to the DrawLine tool?

Posted: Wed Apr 13, 2005 9:29 am
by narcis
Hi Wiebe,

I don't understand what exactly do you mean. Could you please be more specific?

Thanks in advance.

TextBox tool

Posted: Wed Apr 13, 2005 11:20 am
by 8437945
A tool that enables you, after a click somewhere in a chart, to draw some text in a box. Text and box to be definable "on the fly".
We are aware, and we tried ourselves in the past but ran into problems while zooming, that such a thing could be developed on the basis of an Annotation. But your guys are much smarter on that anyhow.

Wiebe

TextBox

Posted: Mon Apr 18, 2005 11:50 am
by 8437945
Narcis,

Could you comment?

Thanks in advance
Wiebe

Posted: Wed Apr 20, 2005 1:21 pm
by Marjan
Hi.

I guess this can already be done (quite easily) with the annotation tool. But as you noticed, if you zoom in/out or stretch chart image, annotation position will not change. This is "normal" as all custom positioned chart objects are defined in screen pixel coordinates.
In your case the best solution is to derive new TAnnotationToolEnh from existing annotation tool and add couple of properties defining tool left-top position, but expressed in axis (real) values. These properties will be set when tool is created and will store (real) axis coordinates. Then you can use these coordinates to actually paint annotation tool at specific x-y coordinate. The big advantage of this approach is if you zoom or scroll, tool screen position will be recalculated from stored (real) axis values and tool screen position will also change if needed.

TextBox

Posted: Thu Apr 21, 2005 6:01 pm
by 8437945
Thanks Marjan,

We'll have a look into it via that way.
OTOH consider to add a Textbox to your tools pallete in TChart V8.

Wiebe

Posted: Thu May 05, 2005 5:53 pm
by 8437945
Allright we succeeded.
We derived a TextBox from TAnnotation with addtional x, y properties, expressed in (real) axis coordinates, and a TChartSeries property enabling coordinate conversion to be performed internally.

Wiebe

Posted: Wed Jul 11, 2007 12:21 pm
by 9349911
Hi Wiebe,

could you please send me some information how you did this? I need something similar in our project.

Thx !!