Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

Create Label to Follow Cursor on the Waveform

I have multiple Y-scales on my Waveform Graph.  I have added a standard Windows Forms Label on top of the graph that I want to "link" to my cursor.  I want the label's XY location to follow the cursors's XY location.  This label is to display the name of the Y-Scale that the user has selected the cursor for.  Here is what I have:

 

Private Sub blueCursorChanged(sender As Object, e As EventArgs) Handles pinkCursorPt.PropertyChanged
        Dim x As Integer, y As Integer
        x = pinkCursorPt.XPosition
        y = pinkCursorPt.YPosition

        lblPinkCursor.Location = New Point(x + 20, y + 20)

 This code appears to be moving the label fine, but moving it to the forms XY coordinates and not the XY coordinates of the cursor on the graph. Can someone provide guidance?  Attached are screenshots of what I want to accomplish, and what my current code is doing after execution.  Can someone provide guidance please.  Thanks

Download All
0 Kudos
Message 1 of 2
(4,174 Views)

Hi DM@Means, 

 

I would take a look at the following links for some help getting started.  

 

http://forums.ni.com/t5/Measurement-Studio-for-NET/one-cursor-with-multiple-labels-for-multiple-plot...

 

http://www.ni.com/example/2820/en/

 

Best wishes!

Amanda B.
Applications Engineer
National Instruments
0 Kudos
Message 2 of 2
(4,146 Views)