Page 1 of 1

Visual C++ and RemoveAllSeries

Posted: Thu Jan 12, 2006 2:41 pm
by 9525312
I am having a strange problem. If I programatically add a series with a title to a TeeChart but dont add any data, then use the remove all series method on the Techart, the series is not removed from the legend.

If one now clicks on the legend, TeeChart.ocx crashes as I suspect the chart is atempting to access the data removed by the clear all series method.

I tried to repeat this behaviour in a VB test app and it appears to be working correctly in VB, If data has been added to the series the remove all series method works as expected and the legend is removed

Posted: Thu Jan 12, 2006 3:13 pm
by 9525312
I have located the problem , if you turn off auto repaint, you must remember to turn it back on :oops:

if you dont then no repaint of the legend area is made and so the old legend is displayed , allowing you to click on a non existent series crashing the TChart OCX