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.
ColorLine events
-
- Newbie
- Posts: 6
- Joined: Fri Oct 10, 2003 4:00 am
- Location: new zealand
- Contact:
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
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