Measurement Studio for VB6

cancel
Showing results for 
Search instead for 
Did you mean: 

How Do You Manipulate an Annotation Image?

I am trying to use an annotation instead of a cursor to examine a trace. The reasons are:

* Annotations do everything that cursors do +MORE
* You can define your own image to use for the marker/cursor
* You can use the caption/text to describe the marker/cursor

The use of annotations is not well documented. Here are the pieces I don't like.

1. The stretch/grab boxes are displayed when I put the TrackMode = cwGTrackDragAnnotation and select the annotation. This is ugly.
2. I don't want to allow the user to resize the annotation image. How do I do this?
3. When I zoom the image container (CWImage?) grows. I turned the stretch property off so that my image size stays the same. But the container is which the image is pl
ace gets big. The result is that the arrow and text are far away from the image. How do I get this container to scale automatically when I zoom?

I would love to have answers to these questions. A good example would be helpful. (The annotation example from NI uses markers and updates annotation text on the CWGraph...not helpful)

Thanks
0 Kudos
Message 1 of 4
(3,634 Views)
Roadkill,

Thanks for the questions. I am going to do some testing and see what I can find. I just wanted you to know that we are looking into your questions.

Thanks,
Shannon R.
Applications Engineer
National Instruments
0 Kudos
Message 2 of 4
(3,634 Views)
One other very important thing I need to know is what the x and y coordinates are for the object. (Just like a cursor) I can't see how to do this.

Thanks.

Craig
0 Kudos
Message 3 of 4
(3,634 Views)
Craig,

I think I have a few answers to your questions. First, the stretch/grab boxes are displayed so that the user will know which annotation is selected in the case that there is more than one annotation. The "ugly-ness" of this is intended to be functional.

I tried zooming on a graph, but I couldn't get the image container to grow. When I zoom in on the point where the image is, the image gets larger unless I zoom in only over the area on the graph covered by the image. Then the area displayed is so small that it shows the lines of the graph and the image annotation/cursor is not shown on the screen.

To get the coordinates, try using the .PointIndex method. I graphed using PlotY and when I use the .PointIndex, I get the X value of th
e annotation point.

Hopefully that will give you a good start. If I come across any other information I will let you know.

Regards,
Shannon R.
Applications Engineer
National Instruments
0 Kudos
Message 4 of 4
(3,634 Views)