LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Control graph cursor with keyboard

Solved!
Go to solution

Is there a way to do move the cursor with the keyboard arrowsbuilt into graphs and charts? If not, I figure it would be simple to do with dynamic event registration. If the user clicks on the graph, register the key down events for the arrows and use arrows pressed to move the cursor some default step size. Only problem, how do I determine when the user has clicked anywhere except on the graph (graph lost focus) in order to unregister the key down events? The only way I can think is to use a mouse down event on the pane and calculate if the mouse coordinates are on the graph control, and if they are, then don't unregister the key down events yet.

0 Kudos
Message 1 of 4
(3,747 Views)
Solution
Accepted by topic author GregFreeman

Hi,

I have done small example for moving cursor using Keyboard.

What I have done is, either you press F10 to get into keyboard mode and move cursor or just like you mentioned, click on Graph it will start

moving cursor with keys and when you will click anywhere else on FP it will stop doing that.

Let me know if this is what you want.

 

 

 

Gaurav k
CLD Certified !!!!!
Do not forget to Mark solution and to give Kudo if problem is solved.
Message 2 of 4
(3,730 Views)

:womanhappy:Hi,..

 

Hope this helps you.

 

 

Message 3 of 4
(3,724 Views)

Thanks gak, this is pretty much what i figured i'd have to do. I was just trying to avoid the calculation every time the mouse was pressed, but oh well. Seems to work fine.

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