[DrawLines] How to delete one line ?
[DrawLines] How to delete one line ?
The question is the the subject : when I draw many lines with the drawlines tool, is it possible to delete juste one line ?
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi bertrod,
Yes, you could use something like the code below. This snippet removes the first drawn line.
Yes, you could use something like the code below. This snippet removes the first drawn line.
Code: Select all
procedure TForm1.Button1Click(Sender: TObject);
begin
ChartTool1.Lines[0].Destroy;
Chart1.Refresh;
end;
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi bertrod,
Yes, you can use something like:
Yes, you can use something like:
Code: Select all
procedure TForm1.Chart1MouseDown(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
begin
if ((ChartTool1.Clicked(X,Y) <> nil) and not ChartTool1.EnableDraw) then
begin
ChartTool1.Clicked(X,Y).Destroy;
Chart1.Refresh;
end;
end;
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |