Request for tool property

TeeChart for ActiveX, COM and ASP
Post Reply
tirby
Newbie
Newbie
Posts: 84
Joined: Mon Mar 16, 2009 12:00 am

Request for tool property

Post by tirby » Tue Apr 21, 2015 10:00 pm

Hello,

I'd like to add a request for a rectangle tool property.

Understanding that as rectangles are deleted, the index or rectangle number changes for all rectangles after the one that is deleted. This is probably fine for most applications, but is causing me an extreme amount of grief. So my solution is to ask for a new property.

Could you include a "Tag" property for each rectangle created, just like the one that is available on standard controls and forms?
It would be a simple string that is married to the specific rectangle.

This would allow me to assign an identifier with the newly created rectangle, that I could use to identify the specific rectangle.

Example:

Code: Select all

k = TChart1.Tools.Add(tcRectangle)
TChart1.Tools.Items(k).asRectangle.Tag = "G1R3"
Since these rectangles are created from within a module, and placed on multiple graphs/forms, keeping track becomes problematic.
In addition, the operator will add and/or delete the rectangles at his will and may or may not be placed on all of the open graphs/forms.
The management of all the rectangles is accomplished on a Master form rather than on each individual graph.

With the above addition of a "Tag" property, "G1R3" would mean the specific rectangle in question is located on Graph #1, and was the 3rd Rectangle added in the Master form. Which has no bearing on the "k" at the time of creation of the rectangle.

Then I could cycle thru all the rectangles on a graph looking for the "Tag" that is the identifier of the rectangle being modified.
The resulting change in index caused by a deletion would thereby be inconsequential.

Thanks!

Yeray
Site Admin
Site Admin
Posts: 9614
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: Request for tool property

Post by Yeray » Wed Apr 22, 2015 9:44 am

Hello,

I've added this is the public tracker:
http://bugs.teechart.net/show_bug.cgi?id=1198

However, if you are not allowing to add&remove tools from the editor, you could maintain you own array of strings adding&removing items while you add&remove rectangle tools.
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

Post Reply