LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Zooming option in Graph Control

Hi,
 
I want to zoom the graph when end user clicks on command button instead of holding down ctrl key and passing left click event. Is there any way so that I can programmatically put the cursor on center of graph control and pass the modifier key and left click event  and  graph should zoom out.
 
Gajanan
Message 1 of 3
(3,253 Views)
No, you can't really do that. You can fake a keystroke, but you cannot fake a mouse event.
 
However, you shouldn't need to do that. In your command button callback, you can simply change the axis range of the graph programmatically, using the SetAxisScalingMode function, and you will have achieved one zooming iteration.
 
If you want to do multiple zooming iterations, you can make multiple calls consecutively, separeted by calls to ProcessDrawEvents, or you can enable a timer and do one zooming iteration each time the timer callback is called.
 
Luis
NI
0 Kudos
Message 2 of 3
(3,243 Views)
Thanks Luis, I will do manual zooming
0 Kudos
Message 3 of 3
(3,231 Views)