05-17-2018 04:28 AM
Hi, I was wondering if there is any way to set limits on cursor movement. I am using two cursors for setting the lower and upper limits of which data to save out of an array. Presently in my event structure on cursor move, I just compare the positions explicitly and if it is out of range I reset it to the position of the other cursor +- a little offset.
This still allows the cursors to move past each other, until the event loop gets around to pushing them back into place. I was wondering is there a better way to handle their limits?
Solved! Go to Solution.
05-17-2018 08:28 AM
You can set the Cursor values Fixed by feeding fixed cursor values, Is your Cursor Range Changes based on your data?
Snippet of developed code will be useful for better guidance.
05-17-2018 09:03 AM - edited 05-17-2018 09:05 AM
No need to reset anything. Just use min&max to use the smaller as lower limit and the larger as upper limit. Irrespective of cursor order.
(Also note that "cursor index" is a better value than "cursor.position.x" to select subsets. I assume you are already doing that. I typically also disable "cursors scroll graph".)
05-21-2018 02:18 AM
Yes, just min/max'ing the cursors makes way more sense.
Just for the sake of curiosity though, is there a way to set a limit on the movement of a cursor? (Within the view of the graph, not talking about auto-scroll.)