Page 1 of 1

Problem: Create CursorTool at Runtime

Posted: Thu Feb 11, 2010 10:42 pm
by 10555167
When I create cursorTool at runtime, the chart did not show the cursor. How could I fix this?

Here are the codes.

Code: Select all

 CursorTool = new TCursorTool(this);
   CursorTool->Snap = true;
   CursorTool->FollowMouse = true;
   CursorTool->SnapStyle = Teetools::ssVertical;
   TFastLineSeries *Series1 = new TFastLineSeries(this);
   Chart1->AddSeries(Series1);
   Series1->FillSampleValues(20);
   CursorTool ->Series = Series1;
   CursorTool->Visible = true;
If I create the cursorTool at design time, that works fine.

Regards
Lizhi

Re: Problem: Create CursorTool at Runtime

Posted: Thu Feb 11, 2010 11:04 pm
by 10555167
Do not worry this. I find the solution by

Code: Select all

Chart1->Tools->Add(CursorTool);
Cheers
Lizhi