01-29-2007 08:28 AM
01-30-2007 03:26 PM
That does put the cursor on the exact pixel position. I tried finding a simple CVI function which would find the data of the plot at that pixel x,y position.
This is how I solved it (the long way):
Basically I took the width of the graph. Then I got the x,y position with the extendedmouseevents. Then I used that as a percentage and used it for the index of the plot.
So if there are 100 elements (0-99 index) and the position is 10% of the graph ( mouse position x / width of graph = .10) then the index is 9. THEN I plot the cursor to index 9 of the plot and attach it there. Then I get the value of the x,y graph and show it in a text box.
I feel a function to convert pixel position to the axis data would be easiest and what I did does basically that. Problem solved (sorta)
Thanks all for ur help in letting me understand this better and settle on this option.