Hi Tim,
I took a quick look at the code, and it seemed to work fairly well for
me (I am using LabVIEW 8.0.1 - which version are you using?). I
noticed the negative values for the boundaries if I move the midpoint
near the edge of the graph, although for me the actual region of
interest stopped shifting left once the left boundary hit zero.
If you want to prevent the user from moving the midpoint beyond this
point, you can edit your Window Midpoint Value Change event case to
force the value to be no less than the width of the region of interest.
I probably didn't clearly understand your question, but for me the
functionality that you're looking to implement is already available as
part of the XY Graph in 8.0. If you open the Graph Palette
attached to the bottom right corner of the XY Graph, there is a zoom
selection that lets you choose an axis-locked region of interest on
which to zoom in on, as well as another zoom option that will take you
back out to the full graph view. Using these may be more
efficient for you.
Cheers,
Matt Pollock
National Instruments