LabVIEW Idea Exchange

cancel
Showing results for 
Search instead for 
Did you mean: 
JackDunaway

Create a "User Control Ended" Event

Status: New

I need to detect when a user has released mouse control of a slider, but that is not possible. I would like to see a new event on controls called "User Control Ended".

 

For instance, consider a user grabbing a slider knob:

 

UserControlBeginning.png

 

The user is able to drag the mouse anywhere, even outside the bounds of the window, and still have control of the slider:

 

UserControlOffScreen.png

 

And if the user Mouse Ups outside the window, you can't detect when that event happened. Here, Mouse Up and Mouse Leave are of no use on either the control or the pane. The new "User Control Ended" event needs to be robust like "Drag Ended", detecting events that happen even outside the VI pane.

 

Conclusion: when a user is interacting with controls using a drag-like operation, I need to know when the user releases the mouse button, whether it be inside the pane, outside, wherever. I have illustrated the example using a slider, but the idea I think should encompass nearly all controls (e.g., a user clicks on a Boolean with "Switch when Released" mechanical action, then drags the mouse outside the Boolean and releases to effectively cancel the Value Change event. Well, I'd still like to catch the "changed mind and released mouse button elsewhere event", a.k.a. the "User Control Ended" event)

 

 

EDIT: Attached the VI so you can play with it.

Message Edited by JackDunaway on 02-19-2010 11:24 AM
5 Comments
JackDunaway
Trusted Enthusiast
Could I get some R&D feedback on feasability or likelihood of this Idea to get implemented? Is it something that has been discussed and is on the R&D backlog? I just realized another sweet UI idea is thrashed without this event capture. :smileysad:
pflores
NI Employee (retired)
Jack, thanks for the idea. I think it is a good one, as I just ran into this issue. I am not sure what R&D's official stance on the issue is, but here is how I got it working.
---

Peter Flores
Applications Engineer
paolok17
Member

In my opinion the suggested workaround is too tricky to be used on several controls and it requires Control X for mouse click detection.

I think it would be really helpful to implement a "control drag end" event as suggested by Jack.

SWalpole
Member

I would love to see an easy way to be notified when the user stopped moving the slider.  If the "User Control Ended" event Jack mentions doesn't gain traction, maybe the last value of the slider could be sent twice.  This is what is done when a panel is resized.  In the Panel Resize event, when the user stops resizing the panel the last value is sent with "OldBnds" being the same as "NewBnds".  This makes it easy for the programmer to handle only the last resize instead of having a bunch of resize events get queued up.

RIPosa
Member

Does anyone have a solution for this problem?
Should I use different knobs in an interface, and it would be nice not to have to use the "pane mouse up" event.

Is X-control a chance?

Thank you.