01-27-2014 01:44 PM
I need to be able to add and remove a cursor from a 2D graph using a button on a dialog box. I figured out how to display a cursor, but I can't find a way to remove it.
Is there is way to use VBScript to remove a cursor from a graph?
01-28-2014 06:26 PM
Hi Jo-Jo,
There's no property of the Cursor that lets you just hide a cursor. I'm not sure yet how you could remove cursors, but I'm looking in to it.
Can you post the script you're using to add/display the cursor?
K Johnson
Applications Engineer
01-29-2014 11:43 AM
Hi Jo-Jo,
I assume you're talking about a 2D graph area in the VIEW panel, right? In that case I'd recommend you switch the cursor mode to crosshair and then position the X,Y location of the crosshair cursor to be "off the map". The simplest way to do that is to assign the X position to be less than the starting X value of the graph.
By the way, what command did you call that "Showed the cursor"?
Let me know if you need help with that,
Brad Turpin
DIAdem Product Support Engineer
National Instruments
01-29-2014 12:30 PM
I just used this:
View.Sheets(1).Areas("Results").DisplayObj.Area.Sheet.Cursor.Type = "Frame"
My workaround has been to move the curosr to line up with the outside edge of the chart, which is pretty much what you suggested.
02-24-2025 05:48 AM
You could use these commands to make the cursor almost invisible. I am not so sure with -1 at the CursorWidth, but optically it looks like the thinnest cursor.
View.Sheets(1).Areas(1).DisplayObj.Area.Sheet.Cursor.ActiveCursorColorRGB = RGB(255,255,255) ' DEFAULT 13150860
View.Sheets(1).Areas(1).DisplayObj.Area.Sheet.Cursor.HotspotColorRGB = RGB(255,255,255) ' DEFAULT 13382400
View.Sheets(1).Areas(1).DisplayObj.Area.Sheet.Cursor.InactiveCursorColorRGB = RGB(255,255,255) ' DEFAULT 14469300
View.Sheets(1).Areas(1).DisplayObj.Area.Sheet.Cursor.CursorWidth = -1 ' DEFAULT 2