I have created a 3 way switch using slider (Top:Increment, Middle:Idle and Down:Decrement).
Requirement: when we move the slider from idle(default) to increment position (until release the mouse) the slider should be at increment position and whenever release the mouse it should coma back to idle , same process required for decrement.
I have made the same using Event structure and mouse release event . Some time,Its working fine and some time its getting stuck at increment/decrement position after releasing the mouse .
I am not ableto find, why its getting stuck at increment/decrement position?
I have attached the VI. Plz find the attached vi and let me know what is the problem.
Thanks & Regards,
Solved! Go to Solution.
Instead of using Mouse Leave, try using Mouse Up . This should help you to achieve the functionality you require.
I have already tried mouse up event and also mouse leave, mouse up mouse down and mouse enter all together in one event block, but still I am getting same response .
I think I know why that is happening. The Mouse Up , Down , Enter and Leave are configured for the single control Pointer 2.
When you release your mouse when it is still inside the control boundaries, the event behaves propoerly, and when you move away from the pointer and release your mouse , it remains stuck at increment or decrement as the event is not registered at the control.
So in order to allow the moving of the mouse when pressed down, try using Pane - Mouse Up as well.
Also note that Pane here refers to the Pane of Front Panel. If the mouse moves out of the front panel window, you might not observe desired functionality.
See the attached Vi