Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

how to remove y-label from cursor label

I display cursors in my application and use the cursor label to show the coordinates in the plotted waveform (Measurement Studio 7.1). In some functions I need only a cursor for the x-axis, where I set the HorizontalCrosshairMode to NONE. Now I want to show the x-coordinate in the cursor label only. When I set the LabelYFormat to "."  
I can hide the y-value but the comma seperator is still shown in the label. Is there a way to get rid of the y-part completely?
 

XYCursor oCursor =

new XYCursor(mNIGraph.Plots[0]);

Cursor.LabelVisible = true;

Cursor.SnapMode = CursorSnapMode.Floating;

Cursor.VerticalCrosshairMode = CursorCrosshairMode.FullLength;

Cursor.HorizontalCrosshairMode = CursorCrosshairMode.None;

Cursor.PointStyle= PointStyle.None;

Cursor.PointSize = new Size(0,0);

oCursor.LabelYFormat = new FormatString(FormatStringMode.Numeric, ".");

0 Kudos
Message 1 of 4
(4,034 Views)

There is not an easy way to do this in Measurement Studio 7.1. You will have to use the cursor custom drawing events and draw the label yourself to get this behavior.

In Measurement Studio 8.0, the cursor has a new property called LabelDisplay whose values can be ShowX, ShowY, and ShowXY. Setting LabelDisplay to ShowX would give you the behavior that you're looking for.

- Elton

0 Kudos
Message 2 of 4
(4,024 Views)
Thanks, Elton. I think there's no way around version 8 Smiley Wink

Are there further improvements concerning cursors, annotations and zoom and pan?

Best regards,
Andy
0 Kudos
Message 3 of 4
(4,018 Views)

There are a couple of other minor improvements related to these features. Namely, annotations now support tooltips. There are 4 tooltip modes:

  • Caption - Displays the caption of the annotation in the tooltip.
  • Data - Displays the data point or data range, depending on if it's a point or range annotation, in the tooltip.
  • Custom - Annotations now have a ToolTip property that allows you to specify a custom string for the tooltip.
  • None - Disables the annotation tooltip.

Also, the graphs now have an InteractionModeDefault property that allows you to specify zoom/pan interactions that do not require the use of a modifier key.

- Elton

0 Kudos
Message 4 of 4
(4,005 Views)