TextBox Tool?

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
Wiebe
Newbie
Newbie
Posts: 26
Joined: Fri Nov 15, 2002 12:00 am
Location: Middelburg
Contact:

TextBox Tool?

Post by Wiebe » Tue Apr 12, 2005 7:32 pm

Any chance for the availability of a TextBox tool, "similar" to the DrawLine tool?

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Wed Apr 13, 2005 9:29 am

Hi Wiebe,

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

Thanks in advance.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Wiebe
Newbie
Newbie
Posts: 26
Joined: Fri Nov 15, 2002 12:00 am
Location: Middelburg
Contact:

TextBox tool

Post by Wiebe » Wed Apr 13, 2005 11:20 am

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

Wiebe
Newbie
Newbie
Posts: 26
Joined: Fri Nov 15, 2002 12:00 am
Location: Middelburg
Contact:

TextBox

Post by Wiebe » Mon Apr 18, 2005 11:50 am

Narcis,

Could you comment?

Thanks in advance
Wiebe

Marjan
Site Admin
Site Admin
Posts: 745
Joined: Fri Nov 07, 2003 5:00 am
Location: Slovenia
Contact:

Post by Marjan » Wed Apr 20, 2005 1:21 pm

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.
Marjan Slatinek,
http://www.steema.com

Wiebe
Newbie
Newbie
Posts: 26
Joined: Fri Nov 15, 2002 12:00 am
Location: Middelburg
Contact:

TextBox

Post by Wiebe » Thu Apr 21, 2005 6:01 pm

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

Wiebe
Newbie
Newbie
Posts: 26
Joined: Fri Nov 15, 2002 12:00 am
Location: Middelburg
Contact:

Post by Wiebe » Thu May 05, 2005 5:53 pm

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

moelski
Advanced
Posts: 212
Joined: Mon Apr 23, 2007 12:00 am
Location: Germany
Contact:

Post by moelski » Wed Jul 11, 2007 12:21 pm

Hi Wiebe,

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

Thx !!

Post Reply