LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

LV7: how to catch 'Value change' event for cursor position in XY graph?

I try to catch an event when the cursor position of a graph's cursor
changes. I created a reference for the cursor array and registered a dynamic
event 'Value change' for it. The event does not fire when the cursor changes
(either by dragging it with the mouse or by direct entry of a new value in
the cursor's X or Y fields. In contrast, when I register e.g. the 'Mouse Up'
event for the cursor array, the event IS detected.


-Franz
0 Kudos
Message 1 of 4
(3,128 Views)
> I try to catch an event when the cursor position of a graph's cursor
> changes. I created a reference for the cursor array and registered a dynamic
> event 'Value change' for it. The event does not fire when the cursor changes
> (either by dragging it with the mouse or by direct entry of a new value in
> the cursor's X or Y fields. In contrast, when I register e.g. the 'Mouse Up'
> event for the cursor array, the event IS detected.
>

The reason is that value change events fire when user action directly on
the control changes its value. They do not fire when other programmatic
value changes occur. If you are looking at a value change on the cursor
palette, user interaction with the numeric should fire it, but updates
due to cursor movement are more
like programmatic updates.

Additional events will likely be added in future releases, and these may
make it easier to catch cursor movement events on a graph.

Greg McKaskle
Message 2 of 4
(3,128 Views)
So this is the same behaviour as that of a regular control which also does
not fire a 'Value changed' event when it gets updated by e.g. writing to a
local.
At least the cursor's behavior is consistent then...

But unfortunately also the direct user interaction with the cursor's numeric
field does not fire the event, which is NOT consistent.
I was trying to catch cursor changes in my event loop and had used a 'Mouse
Up' event of the graph indicator to look for cursor changes (whose last
position I had kept in a local or shift reg). In order not to miss a direct
user interaction in the numeric field I added the dynamic event 'Value
change' to the same event case, but with no success, it missed the direct
entry ...

according to what you say this seems to b
e a bug then...



-Franz



"Greg McKaskle" schrieb im Newsbeitrag
news:3F0B79D6.7010600@austin.rr.com...
> > I try to catch an event when the cursor position of a graph's cursor
> > changes. I created a reference for the cursor array and registered a
dynamic
> > event 'Value change' for it. The event does not fire when the cursor
changes
> > (either by dragging it with the mouse or by direct entry of a new value
in
> > the cursor's X or Y fields. In contrast, when I register e.g. the 'Mouse
Up'
> > event for the cursor array, the event IS detected.
> >
>
> The reason is that value change events fire when user action directly on
> the control changes its value. They do not fire when other programmatic
> value changes occur. If you are looking at a value change on the cursor
> palette, user interaction with the numeric should fire it, but updates
> due to cursor movement are more like programmatic updates.
>
> Additional events will likely be added in future
releases, and these may
> make it easier to catch cursor movement events on a graph.
>
> Greg McKaskle
>
0 Kudos
Message 3 of 4
(3,128 Views)
> according to what you say this seems to be a bug then...
>

Agreed. Can you report this through normal channels, like an email or
web submission?

Greg McKaskle
0 Kudos
Message 4 of 4
(3,128 Views)