Page 1 of 1

ColorLine events

Posted: Sun Nov 23, 2003 7:43 pm
by 8577319
Hello,
I add a TColorLineTool on my chart. How to create onEndDragLine and onDragLine events? I already tried to follow the example from the demo but the drag didn't trigger any events.

Thank you.

Posted: Mon Nov 24, 2003 10:48 am
by Pep
You can do this :


procedure TForm1.FormCreate(Sender: TObject);
begin
Series1.FillSampleValues(10);
Charttool1 := TColorLineTool.Create(self);
with Charttool1 do
begin
Chart1.Tools.Add(Charttool1);
OnDragLine := ChartTool1DragLine;
OnEndDragLine := ChartTool1EndDragLine;
Axis := Chart1.Axes.Left;
Value := 10;
end;
end;

procedure TForm1.ChartTool1DragLine(Sender: TColorLineTool);
begin
// code...
end;

procedure TForm1.ChartTool1EndDragLine(Sender: TColorLineTool);
begin
// code...
end;

Best Regards
Josep Lluis Jorge
http://support.steema.com