ColorLine events

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
ChainSmokinCodeWriter
Newbie
Newbie
Posts: 6
Joined: Fri Oct 10, 2003 4:00 am
Location: new zealand
Contact:

ColorLine events

Post by ChainSmokinCodeWriter » Sun Nov 23, 2003 7:43 pm

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.

Pep
Site Admin
Site Admin
Posts: 3306
Joined: Fri Nov 14, 2003 5:00 am
Contact:

Post by Pep » Mon Nov 24, 2003 10:48 am

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

Post Reply