LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Is there a way to move graph cursors with the right mouse button?

I am currently running LabWindows CVI 5.5p1 for Windows 95.

I have created limit bands on the graph control for analyzing frequency content using two horizontal-line cursors for amplitude, two vertical-line cursors for frequency, and a master cursor in between for movement of the band as a whole. It is important that the bands act as a single unit rather than 5 seperate cursors. The desired behavior is to be able to adjust the amplitude and frequency limits by clicking the edge of the limit band and dragging it to it's desired position. However, the cursors also can be moved by clicking the graph at an arbitrary point. The closest cursor automatically jumps to the clicked point on the
graph. This is obviously undesireable. My question is can I disable the cursors so that the left click event on the graph doesn't move them, but be able to adjust the cursors with the right mouse button or possible a left double click? Any other suggestions? Thanks in advance.

Regards,

bthorp
0 Kudos
Message 1 of 4
(3,466 Views)
You can disable the cursors from being movable with the left mouse button by using SetCursorAttribute to set the Enable attribute to False. Then you will need to edit your graph event handler to handle EVENT_RIGHT_CLICK events. When the user right clicks on the graph, you will get that event and you can move the cursors programmatically based on where they clicked on the graph.

Best Regards,

Chris Matthews
Measurement Studio Support Manager
0 Kudos
Message 2 of 4
(3,466 Views)
I have a similar problem, I want to be able to move an overlay by holding down the mouse buttons I use EVENT_LEFT_CLICK & EVENT_VAL_CHANGED to move the overlay up down left and right and wanted to use EVENT_RIGHT_CLICK & EVENT_VAL_CHANGED to rotate the overlay.  Is there a way I can get the curser to respond to a Right Click or do I have to set flags with the EVENT_RIGHT_CLICK and use the EVENT_MOUSE_MOVE to acchieve this.
0 Kudos
Message 3 of 4
(3,191 Views)

There's no way to get the graph cursor to move using the right-click button. You will have to move it programmatically when you receive EVENT_RIGHT_CLICK. Also, if you have CVI 8.1 or later, you should use EVENT_MOUSE_POINTER_MOVE instead of EVENT_MOUSE_MOVE, which is now obsolete.

 

Luis

0 Kudos
Message 4 of 4
(3,177 Views)