Page 1 of 1

ColorLine with text?

Posted: Wed Jul 21, 2004 1:15 pm
by 8126230
Hi,

I am trying to use a ColorLine to mark an event in a real-time chart that adds data (like a strip chart). This event needs to have text associated with the line and I can not seem to find a way to accomplish this simple task.

I've tried an Annotation but can't seem to link it to the position of the line.

Any suggesstions?

Jim

Posted: Thu Jul 22, 2004 11:01 am
by Pep
Hi Jim,

I've posted an VB:Net example into the steema.public.attachments newsgroup which show how to do this.

Posted: Thu Jul 22, 2004 4:12 pm
by 8126230
Hi Pep,

I took a look at you sample and we (another developer and I) had looked at annotations but they have a flaw.

If you change your VB sample project so that the graph object is anchored to all four borders (Top, Left, Bottom, Right) and resize, the annotations do not stay with the line. Maximizing then minimizing has a similar behavior.

More event hooks are needed to make sure the annotations stay with the line.

Jim

Posted: Tue Jul 27, 2004 12:01 pm
by Chris
Hi Jim,
If you change your VB sample project so that the graph object is anchored to all four borders (Top, Left, Bottom, Right) and resize, the annotations do not stay with the line. Maximizing then minimizing has a similar behavior.
I'm afraid I can't reproduce this one here; could you please give me step-by-step instructions on how to do so with reference to Pep's test project?

Many thanks!

Posted: Tue Jul 27, 2004 2:28 pm
by 8126230
Hi Chris,

1) Go to the Form1.vb Designer screen and change the Anchor to Top,Left,Bottom, Right.

2) Recompile and Run.

3) Put the line anywhere in the graph and move the mouse pointer straight up outside the graph area.

4) Resize the window and the text will not follow the series lines but does stick to the line.

5) Move the line within the graph again and move the mouse pointer out. This time click the maximize button.

6) Move the line again, move the mouse pointer out and then minimize the button. The labels are most usually not visible on my screen but will most certainly be off on any screen.

Thanks,
Jim

Posted: Tue Jul 27, 2004 2:57 pm
by Chris
Hi Jim,

I've posted a workaround to this issue to:
news://www.berneda.com/steema.public.attachments