Hi,
I have run into a bit of a problem. I am trying to create a program which allows a user to select a location on an XY graph by simply clicking in the vacinity of the plot. Most of it is working, however I find that I can't programmably control the snap to point function reliably.
I hope this is a clear outline of the problem:
- The cursor starts in a Free state, so that when the
user clicks in the plot area, I can set the cursor
position to the nearest point by setting the
CursorPosition using the graph's property node.
- Maybe the user didn't like the chosen location and
wants to drag the cursor over a bit. Ok, user drags
the cursor to a new position.
- Now th
e cursor position is probably not exactly on
the plot trace. If, at this point, I set the cursor
to Snap To Point, the cursor does not snap to the
nearest point on the graph (relative to its current
position), but instead to the last place a _mouse_
action placed it.
- Immediately after the new location has been set,
the cursor state has to be reset to free in case I
need to programmably move the cursor again (I
can't seem to programmably control the mouse in
any state but Free)
How do I go about getting the cursor to snap to the closest point at it's new location? I'm at a loss.
Any insight you might have would be greatly appreciated.
Thanks much!
Tere