User | Kudos |
---|---|
4 | |
2 | |
1 | |
1 | |
1 |
If, for example, you wish to create shortcut menus specifically for one axis on a graph you need a way to either detect that an axis is clicked on (and if so, which one) - or you need to be able to associate shortcut menus to an axis.
LabVIEW does this with the default menus, but if you want to implement such functionality yourself you need to read the scale's position and bounds and compare it with the mouse click coordinates. Not very neat. (At least this is the way I've come up with, is there a better way?).
There is already a method named "Get Plot at Position" that you can use to figure out if a given plot has been clicked, but no such thing for the axis or other parts of the graph. In fact, that method could be covered by this idea as well, so that you can read it out as a form of information accompanying the click event.
The subobj parameter that you get from the event could be used for this. Just like the subobj references a sub-control in a structure like a cluster it could also reference the axis (or other "sub-control") of the graph.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.