Page 1 of 1

Problem with CursorTool drag (v 7.05 BCB6)

Posted: Thu Feb 16, 2006 9:56 am
by 9340009
I have a fast line series and a cursor tool with ChartTool1->Style = cssBoth;

I write code
double Koeff = 0.001;
for(int i = 0; i < 10000; i++)
FastLineSeries1->AddXY(Koeff * i, ...);
ChartTool1->XValue = 0;
ChartTool1->YValue = 0;

My problem is:
When I drag a cursor it jumps only on series points that have YValue = 0
When Koeff >= 0.5 or ChartTool1->Style = cssVertical it works well.

Posted: Thu Feb 16, 2006 10:42 am
by narcis
Hi gan,

I can not reproduce the problem here but I'm making some assumptions because I don't have all the information necessary. Could you please let us know the TCursorTool settings you use and how do you exactly populate FastLineSeries1? An example project we can run "as-is" to reproduce the problem here would also be very helpful. You can post your files at news://www.steema.net/steema.public.attachments newsgroup.

Problem with CursorTool drag (v 7.05 BCB6)

Posted: Thu Feb 16, 2006 12:11 pm
by 9340009
Ok. I put it to newsgroup

Posted: Thu Feb 16, 2006 3:33 pm
by narcis
Hi gan,

I'm not quite sure of which is your problem and couldn't compile your project because I got:

[Linker Fatal Error] Fatal: Unable to open file 'CXPAGECONTROLVCLC6.LIB'

However, your problem may be solved using:

Code: Select all

    ChartTool6->Snap=false;

Problem with CursorTool drag (v 7.05 BCB6)

Posted: Fri Feb 24, 2006 1:39 pm
by 9340009
see new version of Project in newsgroup

Posted: Fri Feb 24, 2006 2:43 pm
by narcis
Hi gan,

Thanks for the project.

I've been able to reproduce the problem you reported. What happens is that, having the TCursorTool Snap property enabled, the tool snaps from the first point of the series. According to this, the cursor always snaps "backwards". As your series first X value is 0 and doesn't have a lower value this is where the cursor stops.

You could avoid that by setting another tool XValue or setting ChartTool6->Snap=true.

I've also added a request to implement a SnapStyle property for TCursorTool in our wish-list. This property would let the user choosing the tool to snap in horizontally, vertically or both.