ā04-12-2025 08:34 AM
Hi everyone,
Iām using a Slide control in LabVIEW and I want to read its value when the user moves the mouse over it (using the Mouse Move event).
Iāve implemented it, but I see a deviation between the value I get during the Mouse Move event and the actual visible position of the slide.
Why does this deviation happen?
Thanks!
ā04-12-2025 09:29 AM
Most here won't be able to open VIs saved in LabVIEW 2025. So a "save for previous (2020 or below) and attach again.
A mouse over event does not change the value of a control. If you are actually operating the slide, use a value change event instead. (make sure to limit the event queue to 1)
ā04-12-2025 10:45 AM
LabVIEW 2016:
ā04-12-2025 11:16 AM - edited ā04-12-2025 11:17 AM
(If you save the main VI for previous, it will drag all dependencies with it. If you rename the dependencies outside LabVIEW as you did, all dependencies are broken and need to be fixed manually. It is always super annoying if all front panels and diagrams are maximized to the screen.)
Can you explain the purpose of this entire convoluted exercise?
Basically, you are trying to get a precise floating point value out of something that is coerced to maybe 100 pixels.
At least also include a mouse-down event (which, on the scale, will change the value even if the mouse is not moved) and set the events not to lock the panel.
Your coordinates from the event terminal are from when the mouse was moved (possibly from a stale accumulated earlier event in the event queue), while the property node will read the value at the present time.
ā04-12-2025 11:30 AM
Thanks for the detailed explanation!
The purpose of this exercise is that I want to read the value of a Slide control even when it is disabled or set as an indicator.
Iām trying to capture the value based on mouse position without needing user interaction (like a click).
ā04-12-2025 11:39 AM
If it is disabled or an indicator, you cannot change the value and the code already knows what it is (it is in the wire!). An indicator is just a passive UI element and shows whatever is in the wire leading to it.
Why do you even care about the mouse position? You could just use a "mouse-down" event and read the existing value from a local variables.
This entire exercise feels like a rabbit hole. š
ā04-12-2025 11:47 AM
Thanks for the reply.
Let me clarify my goal:
I know that if the control is disabled or an indicator, I canāt change its value ā and yes, the value is already available in the wire.
However, what I want is to get the value that corresponds to the mouse position over the Slide, even if the control is disabled or just an indicator.
In other words:
I want to treat the Slide as a āscale background,ā and when the user hovers the mouse over it, I want to calculate what value the position would correspond to ā without relying on the Slideās actual value (because itās not being changed by the user).
So I care about the mouse position because I want to map X/Y coordinates to a value along the slide scale, even if the control is passive.
Itās not about changing the Slideās value ā itās about detecting where the mouse is and mapping that to the controlās scale.
Hope that makes more sense why Iām doing this.
ā04-14-2025 07:43 AM
Just set the Tip Strip?
ā04-14-2025 08:11 AM
I have a Mouse Move event on a Slide, and I want to continuously get the value the Slide would take at the current mouse position, as if the user were to click there ā even if they don't actually click.
So property like value can't help me.
ā04-14-2025 08:44 AM
Hello Max,
Best I could do is the following :
As you may have noticed, there is no "Housing Position" property ... So you need to add this delta when calculating the relative position on the slide.
And since this delta is hard to measure, you will still have a delta between the measured and actual positions.