Page 1 of 1

Deleting a MarkTips Tool

Posted: Wed Jan 27, 2010 4:49 pm
by 9532498
I'm deleteing the MarksTips Tool from the list of tools associated with my chart as follows. The MarkTips tool disappears from the list when viewed from the Editor but the MarkTips are still active on the chart. What am I missing?

Code: Select all

if (pChart->GetTools().GetItems(i).GetToolType() == tcMarksTip)
           pChart->GetTools().Delete(i);
Thanks
--nbp

Re: Deleting a MarkTips Tool

Posted: Thu Jan 28, 2010 3:45 pm
by yeray
Hi nbp,

Could you please tell us in what exact environment are you seeing this? I've tried the following in a Visual Studio 2008 C++ project and, adding a bar series and a marktips tool at design time and deleting it with the following code, it seems to be deleted correctly:

Code: Select all

axTChart1->Tools->Delete(0);
I've also tried in VB6 and found no problems with:

Code: Select all

TChart1.Tools.Delete 0
Could you please send us a simple example project we can run as-is to reproduce the problem here?
Thanks in advance.

Re: Deleting a MarkTips Tool

Posted: Thu Jan 28, 2010 10:24 pm
by 9532498
I'm using Visual Studio 2008 VC++, TChart v7.0 (ActiveX). I've added the tool to the chart at runtime with the following:

Code: Select all

long nMarksTipNo = pChart->GetTools().Add(tcMarksTip);
Unfortunately, I can't send you the entire project, it's too big.

Re: Deleting a MarkTips Tool

Posted: Fri Jan 29, 2010 11:48 am
by yeray
Hi nbp,

Not your final application because it would probably be difficult for us to run and/or debug it. But, if it is so easy to reproduce, it shouldn't be too much work for you to prepare a new simple example project that reproduces the same behaviour.

Thanks in advance.