11-26-2021 07:27 AM
Hello everyone,
I have a graph with multiple plots and a single cursor in Snap to point mode.
Since the cursor is in Snap to point mode, is it possible to have the handle of the plot selected by the cursor?
thanks in advance
--
Mattia G.
Solved! Go to Solution.
11-26-2021 07:37 AM
Tere are several ways to obtain this element.
The graph control callback will return an EVENT_COMMIT when a cursor is operated: these data are included:
Graphs | All graph commit actions | eventData1 = The index of the cursor or the annotation, depending on which one the user moved eventData2 = VAL_CURSOR or VAL_ANNOTATION, as appropriate to eventData1 |
From the cursor index you can obtain the plot handle calling GetGraphCursorIndex () function.
Otherwise you can directly call GetGraphCursorIndex passing the number of the cursor you are intested to.