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"
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!