LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

mouse up event on a slide

it's more a comment than a question. When I clicck on a slide control and keep the mouse down, I keep control of the slide value even if my mouse gets outside the control area.it's ok for me but in that case the Mouse Up event will not work. for the Mouse Up event to work properly, the arrow must remain on the slide control.
Any chance to fix it?
0 Kudos
Message 1 of 6
(3,665 Views)
It was meant to work that way so that you have a way to abort the event if you feel like you made a mistake when clicking on the control. Just keep your mouse in the proper area.
- tbob

Inventor of the WORM Global
0 Kudos
Message 2 of 6
(3,665 Views)
Check panel mouse up event.

George Zou
http://gtoolbox.yeah.net
George Zou
0 Kudos
Message 3 of 6
(3,665 Views)
I think you're missing the problem. If you move your mouse outside of the bounds of the slide control, the control's value still changes when moving the mouse up and down, however, the event is not seen. So you've got a change in the front panel control that's not seen by the event handler.

For consistency, if you wanted to abort the action on the control by moving the mouse out of the bounds of the slide, the slide control would revert to the value prior to the action.

Since this doesn't happen, you'll have to either keep your mouse within the control. Setting the event to trigger on Value Change probably won't work since you'll have an event for each incremental change in the slide.

Tim
0 Kudos
Message 4 of 6
(3,665 Views)
Hello Guibook,

Thank you for contacting National Instruments.

You are correct in your description of the slide control. To work around this, you would have to dynamically register a panel mouse up event during the slide mouse down event. Then you would unregister the panel mouse up event after it executes.

I have attached an example workaround VI which demonstrates this.

I hope this helps,

Sean C.
Applications Engineer
National Instruments
Message 5 of 6
(3,665 Views)
Sorry, I misunderstood your problem. I was able to re-create your problem. This could be considered a bug, moving off slider before letting mouse up should return the pointer to its original value, but it does not. So now your event doesn't fire because it never saw a mouse up event on the slider. The only fix I could see is to set the event trigger to Value Change. Yes you will have an event for each incremental change. Don't know of a good solution.
- tbob

Inventor of the WORM Global
0 Kudos
Message 6 of 6
(3,665 Views)