Change Color of the Lines for "Drag Marks - Tool"

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
Woehr.Mi
Newbie
Newbie
Posts: 38
Joined: Mon Jun 23, 2008 12:00 am

Change Color of the Lines for "Drag Marks - Tool"

Post by Woehr.Mi » Thu Oct 02, 2008 11:17 am

Hello,

I use the "Drag Marks - Tool" in my TChart - Application. How can I change the color of the Lines from the Series to the Dragged Marks? white.

Thanks.

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Thu Oct 02, 2008 11:25 am

Hi Woehr.Mi,

You can use tool's OnDraggedMark event like this:

Code: Select all

procedure TForm1.ChartTool1DraggedMark(Sender: TDragMarksTool;
  Index: Integer; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
begin
  Sender.Series.Marks.Arrow.Color:=clRed;
end;
However, this will change all marks arrows, not only those that have been dragged.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Woehr.Mi
Newbie
Newbie
Posts: 38
Joined: Mon Jun 23, 2008 12:00 am

Post by Woehr.Mi » Thu Oct 02, 2008 11:45 am

Hello Narcís,

Thanks for the quick response! That's exactly what I need. But when I run this code I get a a access violation.

Another Problem that I have is:
When I drag some marks to another position and after that I start zooming or scrolling the marks stay at their absolute position (also the arrows from the Series to the Marks).

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Thu Oct 02, 2008 12:06 pm

Hi Woehr.Mi,
Thanks for the quick response! That's exactly what I need. But when I run this code I get a a access violation.
This code worked fine for me here. Which TeeChart version are you using?
Another Problem that I have is:
When I drag some marks to another position and after that I start zooming or scrolling the marks stay at their absolute position (also the arrows from the Series to the Marks).
For this to work you should set marks position to be relative to some chart object: series points, axes, legend, title, etc. So you can use custom marks position as shown in the forums threads below. You could calculate their position relative to series points.

http://www.teechart.net/support/viewtopic.php?t=4919
http://www.teechart.net/support/viewtopic.php?t=2230

Hope this helps!
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Woehr.Mi
Newbie
Newbie
Posts: 38
Joined: Mon Jun 23, 2008 12:00 am

Post by Woehr.Mi » Thu Oct 02, 2008 12:09 pm

I use TeeChartPro : v8.02.10861 Win32

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Thu Oct 02, 2008 12:40 pm

Hi Woehr.Mi,

Thanks for the information. I'll send you v8.03 installer so that you can check if it solves the problem at your end. v8.03 is a test version and we will release v8.04 very soon.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Woehr.Mi
Newbie
Newbie
Posts: 38
Joined: Mon Jun 23, 2008 12:00 am

Post by Woehr.Mi » Mon Oct 06, 2008 2:44 pm

Hi Narcís,

Thanks for the information. I'll send you v8.03 installer so that you can check if it solves the problem at your end. v8.03 is a test version and we will release v8.04 very soon

Thanks for sending me the Version 8.03. I'll try if it works better with this Version.
For this to work you should set marks position to be relative to some chart object: series points, axes, legend, title, etc. So you can use custom marks position as shown in the forums threads below. You could calculate their position relative to series points.

http://www.teechart.net/support/viewtopic.php?t=4919
http://www.teechart.net/support/viewtopic.php?t=2230
Thanks for the links to these Forum-Threads.
But I couldn't find out how to calculate the relative positions between marks and the Series-Points.

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Mon Oct 06, 2008 2:56 pm

Hi Woehr.Mi,
But I couldn't find out how to calculate the relative positions between marks and the Series-Points.
If you look at the second page of the first thread, I posted a message doing exactly what you request.

Hope this helps!
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Post Reply