Delete all Tools through Code
Posted: Sat Sep 23, 2006 2:35 am
Hello,
I would like to programatically remove all the tools which have been added to a chart. My current code is;
i = 1
While i <= (.Tools.Count - 1)
.Tools.Delete(i)
i = i +1
Wend
This code appears to work most of the time and then other times it will error, I cannot find the source of the fault. Any advice?
My project creates and formats the chart area and series at runtime through code.
When the user requests a new chart, the chart space is formatted again.
What would be handy is a command which will reset the TChart back to it's original state as it sits on the form in the IDE, does such a command work?
Kind Regards
Anthony
I would like to programatically remove all the tools which have been added to a chart. My current code is;
i = 1
While i <= (.Tools.Count - 1)
.Tools.Delete(i)
i = i +1
Wend
This code appears to work most of the time and then other times it will error, I cannot find the source of the fault. Any advice?
My project creates and formats the chart area and series at runtime through code.
When the user requests a new chart, the chart space is formatted again.
What would be handy is a command which will reset the TChart back to it's original state as it sits on the form in the IDE, does such a command work?
Kind Regards
Anthony