PA-Paul Posted February 20, 2014 Report Share Posted February 20, 2014 Does anyone know if there's a way to get the value of a position along a slide control based on mouse co-ordinates? For example, the waveform graph has an invoke node which will "Map Coords to XY" I'm after a similar functionality but for a slide control so that I can either prevent unwanted clicks in a certain region of the slider (i.e. I have a 2 slide control and want to either filter out any clicks that fall outside of the region between the sliders, or switch the active slider to be the one closest to the click before the click is processed). I put a slightly more detailed (complicated?) description over or NI.com (http://bit.ly/1l1iJr6) but haven't had a response yet, just wondered if anyone on here might have some ideas? I've have managed a bit of a workaround by cobbling together the co-ordinate of the mouse with some bounding box info on the scale and housing of the control and prior knowledge of the scale range, but I just thought that, at least under the hood labview is doing what I want, is there a way I can access it?! Thanks Paul Quote Link to comment
Tim_S Posted February 20, 2014 Report Share Posted February 20, 2014 I'm finding a property (LV 2012) called "Housing Size" that could be used with the position to determine the slider area versus the scale area. I don't see an equivalent method to map the click coordinates to a numeric value. Quote Link to comment
hooovahh Posted February 20, 2014 Report Share Posted February 20, 2014 I'm finding a property (LV 2012) called "Housing Size" that could be used with the position to determine the slider area versus the scale area. I don't see an equivalent method to map the click coordinates to a numeric value. This is the only thing I can think of that would work as well but it probably is very error prone. Lets say your control size is 100px high according to the Housing Size property. That will likely include the borders, and any small spaces around the slider, and possibly things like the label/caption and digital display. These things will need to be taken into account and the range from min to max on the control and may not be very accurate. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.