Annotate, DLine, and DragMark issues

TeeChart for ActiveX, COM and ASP
Post Reply
tirby
Newbie
Newbie
Posts: 84
Joined: Mon Mar 16, 2009 12:00 am

Annotate, DLine, and DragMark issues

Post by tirby » Mon Mar 18, 2013 1:21 am

Hello,

My program monitors for "Events" that cause TChart to place an Annotate & DLine on the graph to mark the time of the event.
I'm using the basic code Yeray provided in an earlier post, and that part seems to be working fine.

First Issue:
The problem I'm now having is that each time a new Annotate/DLine pair are generated the DLine of all previous Annotate/DLine pairs dissapears. Which ever Annotate has the focus, the accompaning DLine is visible, yet no other DLine is. Can't figure out why. What other seemingly unrelated conditions might have an effect on the DLine?

Second Issue:
Having generated a DragMark, setting it's active parameter to True, and assigned a series, I'm not able to move the Annotate/DLine pair. I have looked at the DragMarks OnDragged Demo Project, but am unable to determine how to make this work. Am I mistaken about the function of the DragMark tool?

Can someone help please?

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

Re: Annotate, DLine, and DragMark issues

Post by Narcís » Mon Mar 18, 2013 1:16 pm

Hi tirby,
I'm using the basic code Yeray provided in an earlier post, and that part seems to be working fine.
I assume Yeray's example is this, right?
First Issue:
The problem I'm now having is that each time a new Annotate/DLine pair are generated the DLine of all previous Annotate/DLine pairs dissapears. Which ever Annotate has the focus, the accompaning DLine is visible, yet no other DLine is. Can't figure out why. What other seemingly unrelated conditions might have an effect on the DLine?
If I understand your problem it works with Yeray's example, doesn't it? You could check which changes have you done to the code that might have affected that.
Second Issue:
Having generated a DragMark, setting it's active parameter to True, and assigned a series, I'm not able to move the Annotate/DLine pair. I have looked at the DragMarks OnDragged Demo Project, but am unable to determine how to make this work. Am I mistaken about the function of the DragMark tool?
Yes, this is to drag standard series marks. Don't forget that the Annotation + DragLine tools combination are not original TeeChart series marks. To implement annotation dragging you should change its custom position in the OnMouseMove event or replace Annotation tools by Rectangle tools which already supports dragging. Also, find attached an old project I did to demo Annotation tool dragging.
Attachments
DragAnnotationEditText.zip
(1.99 KiB) Downloaded 850 times
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

tirby
Newbie
Newbie
Posts: 84
Joined: Mon Mar 16, 2009 12:00 am

Re: Annotate, DLine, and DragMark issues

Post by tirby » Tue Mar 19, 2013 6:19 pm

So I discovered that if the color is set to vbBlack, then the line(s) will dissappear when the focus shifts to a different pair. My fix was:

Code: Select all

TChart1.Tools.Items(ToolSelected + 1).asDrawLine.Lines.Items(0).Pen.Color = vbRed
Not sure why, and I really want to set the color to Black.

The use of the Rectangle Tool works good!

Thanks

Yeray
Site Admin
Site Admin
Posts: 9614
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: Annotate, DLine, and DragMark issues

Post by Yeray » Thu Mar 21, 2013 11:45 am

Hi tirby,
tirby wrote:Not sure why, and I really want to set the color to Black.
If you still find problems with it, please try to arrange a simple example project we can run as-is to reproduce the problem here.
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

Post Reply