03-09-2011 11:29 AM
Hi All,
How can I zoom or pan a graph using the keyboard instead of the mouse?
Cheers
Patrick
Solved! Go to Solution.
03-09-2011 11:43 AM
Patrick,
I don't believe there is a property/method you can access to do this but it is possible. I would suggest capturing the key down event using an event structure and then modfiying the graph x and y scale ranges by some increment to either zoom in or zoom out. This can be done by writing to a property node (X Scale - Range - Maximum/Minimum). You will want to control the loop rate appropriately to achieve a reasonable speed of zooming.
Dan
03-11-2011 03:57 AM
Hi Dan,
Thanks for you answer, working with the property nodes, X / Y Scale Range Maximum / Minimum, did the job.
To capture the pressed key I am using the Initialize Keyboard.vi, Acquire Input Data.vi (shipped with LabView) and a
Index Array wired into a case structure. Depending on what I want to do, Zoom In / Out or Pan left / right, I am increasing
or decreasing the Scale Maximum / Minimum.
Cheers
Patrick