LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

key down event on a graph

Solved!
Go to solution

Hi everyone,

 

I am trying to trigger several events (autoscale, zoom) on a graph by key down event when my mouse is on the graph. Is that possible?

 

I attached an vi to demonstrate the issue.

0 Kudos
Message 1 of 5
(2,757 Views)
Solution
Accepted by topic author Xiang00

Hi Xiang,

 

a graph usually is an indicator, so it might be hard to receive UI events meant for controls…

 

by key down event when my mouse is on the graph

You can use one event case to detect "mouse over graph". Using this information you can use another event case to receive all key input events of the whole VI frontpanel, but only handle them when mouse is over the graph…

 

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 2 of 5
(2,750 Views)

Dear GerdW,

 

Thank you very much for your promet reply.

With your advice I solved my issue perfectly.

 

Best regards,

Xiang

0 Kudos
Message 3 of 5
(2,731 Views)

Hi Xiang00,

 

I am trying something similar, but I could not follow this thread. Do you mind sharing your code in 2014 version? My goal is to zoom in/out the y-scale of a graph with the mouse scroll.

 

Thanks!

0 Kudos
Message 4 of 5
(1,431 Views)

@rpicazof wrote:

Hi Xiang00,

 

I am trying something similar, but I could not follow this thread. Do you mind sharing your code in 2014 version? My goal is to zoom in/out the y-scale of a graph with the mouse scroll.

That is a totally different problem.

 

Use an event structure to catch the Mouse Wheel event on the VI's pane(s). Then use the graph's property nodes to change the graph's scales.

Message 5 of 5
(1,408 Views)