Page 1 of 1

OnRemoveSeries Events

Posted: Thu Nov 02, 2006 11:07 pm
by 9527696
Hello,

There are events for OnSeriesBeforeAdd and OnSeriesAfterAdd. Could we do the same for when the user removes a series. :)

For example, if the user deletes a series via the TeeListBox, there's more cleanup that needs to be done in my code. It would be nice if we received an event for when this happens, either in the TeeListBox or in the TChart.

Thanks a lot!

Jennifer Britt

Posted: Fri Nov 03, 2006 8:47 am
by narcis
Hi Jennifer,

I've added your request to our wish-list to be considered for inclusion for future releases.

Posted: Tue Nov 07, 2006 6:31 pm
by 9527696
Thank you!

Posted: Tue Nov 14, 2006 4:32 pm
by David
These new events have been added in v8 beta.

Code: Select all

Chart1.OnAddSeries(Sender:TCustomChartSeries);

Chart1.OnRemoveSeries(Sender:TCustomChartSeries);

They are called just after a series has been added to a Chart, and just after it has been removed.

Note: Adding or removing a series to a chart happens when the series ParentChart property is set.

Code: Select all

Series1.ParentChart := Chart123;
When a Series is destroyed (ie: by calling Series1.Free), it is previously removed from a chart by setting its ParentChart property to nil.