10-16-2006 04:02 PM
10-17-2006 12:48 PM
Hi Matthew,
I'm interested to know what specific examples you were looking at. I have pulled up a few examples but am unable to find an example that holds the zoom factor.
While we do not have any specific examples that show how to set the zoom factor, I can give you some pointers.
First, you can use the zoom events on the waveform graph to check when a graph's zoom has changed. For instance, you could use the Zoom event to check whenever the graph has been zoomed. Then you could save the zoomed range from the X-axis to a variable and assign this range later when you plot.
You could use this method to get the zoom factor as well. You could then use the function ZoomAroundPoint if you know where you want to zoom around and at what factor you want to zoom.
This should get you started. Let me know what example you were looking at, I'll check it out and then I might be able to give you a more specific answer.
Matt
NI
10-17-2006 01:14 PM
10-17-2006 02:38 PM
10-20-2006 04:03 PM
10-20-2006 05:07 PM
10-23-2006 04:14 PM
10-23-2006 04:49 PM
Hi Matthew,
To answer your first aside, the reason that the magnifying glass does not appear until you have clicked on the graph control is because the graph control does not have focus. The application may have focus (and probably another control on the application has focus), but you must select the graph before your cursor will recognize the shift-press event.
In order to accurately describe zooming out, I'll first reference zooming in. When you zoom in, when you shift+click, a colored box should appear around the area you are zooming in on. Then, if you have ZoomAnimation turned on for your graph, there will be an animation that "shows" zooming in. For zooming out, the colored box will not appear; however, the outline animation should happen if ZoomAnimation is set to true.
The zoom in and zoom out function should be built in to the graph control as described above.
Are you able to zoom in and then zoom out? From what it sounds like, you are trying to zoom out before you have ever zoomed in. I do not believe this is possible because I do not think the graph will let you zoom outside of its range if the range is set to Fixed (which is necessary for you if you do not want the range to change on each plot). Even if you move around the graph (using Control+drag) and then try to zoom out, your range does not change, it simply continues moving you towards your initial range.
If you are unable to zoom out after zooming in, try your exact click sequence on one of our examples and see how it reacts differently. I created a simple example and was able to replicate everything I told you above with Measurement Studio 8.0.1 and Visual Studio 2005.
Matt
NI
10-24-2006 08:12 AM
10-24-2006 03:34 PM