Page 1 of 1

Changing series data, cursor tool data isn't change

Posted: Tue Dec 20, 2005 1:42 am
by 9235196
I have a fast line series and a cursor tool.
I have write the code to get the cursor data for OnSnapChange and OnChange event. My problem is: I change the cursor data, but both OnSnapChange and OnChange event doesn't get executed.
I have called CursorTool1->repaint(), chart1->update but it's all the same.
So series has been changed but the displayed cursor data isn't. Is there a simple way to solve this?

Posted: Tue Dec 20, 2005 11:28 am
by narcis
Hi Herman,

It works fine here using v7.06. Which TeeChart version are you using?

Posted: Tue Dec 20, 2005 11:52 am
by 9235196
I'm using v7.05.
Well it works fine when i use button or move the cursor using the mouse.
Only when i change the series data, without doing anything to the cursor tool; OnSnapChange and OnChange event of charttool doesn't get executed

Posted: Tue Dec 20, 2005 12:13 pm
by narcis
Hi Herman,

Can you please test if v7.06 works at your end? If not, could you please send us an example we can run "as-is" to reproduce the problem here? You can post your files at [url]news://www.steema.net/steema.public.attachments[/url] newsgroup.

Posted: Wed Dec 21, 2005 4:04 pm
by narcis
Hi Herman,

We don't understand the problem. It works as it should, if you load data and assign an X value to the cursor (3 for example), after loading new data the cursor remains at its position (position 3). Otherwise, what do you think it would do? Could you please be more specific on the problem?

Thanks in advance.

Posted: Thu Dec 22, 2005 5:27 am
by 9235196
The cursor position is correct but the cursor value shown isn't. The value is the old value, before i called to change the series data.
I think the problem is because i write the code for updating cursor value in OnSnapChange event.

Posted: Fri Dec 23, 2005 11:23 am
by Pep
Hi Herman,

I'm sorry, I don't understand nor see where is the problem. Using the following code :

Code: Select all

procedure TForm1.BitBtn1Click(Sender: TObject);
begin
Series1.FillSampleValues();
Edit1.Text:=floattostr(charttool1.XValue);
Edit2.Text:=floattostr(charttool1.YValue);
end;

procedure TForm1.FormCreate(Sender: TObject);
begin
Series1.FillSampleValues();
Chart1.Draw();
Edit1.Text:=floattostr(charttool1.XValue);
Edit2.Text:=floattostr(charttool1.YValue);
end;
Both textBox are displaying the same values always, even if I click the button to add Random values to the Series.
Could you please post the code you're using so we can reproduce the problem here ? or post an example iinto the news://www.steema.net/steema.public.attachments newsgroup ?