LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Overlapping sliders

I'm trying to create a slider control that prevents 'overlapping' sliders, that is, restrict the value of each slider to between the adjacent slider values.  I stole tst's example outright (thank you tst), tried to duplicate & extend it for my control, but to no avail.  His stuff is at

 

http://forums.ni.com/t5/LabVIEW/Limit-range-of-one-slider-to-the-other-slider-s-value-on-a-two/m-p/2...

 

Any ideas of what I'm doing wrong? Thanks, paul

Download All
0 Kudos
Message 1 of 7
(2,139 Views)

The Minimum & Maximum limits only affect data entered into the digital displays (which aren't visible in your case).

They don't affect the sliders.

"If you weren't supposed to push it, it wouldn't be a button."
0 Kudos
Message 2 of 7
(2,102 Views)

@paul_cardinale wrote:

The Minimum & Maximum limits only affect data entered into the digital displays (which aren't visible in your case).

They don't affect the sliders.


This is not true, as evidenced by tst's example. The real issue is that you do not have your Data Entry Limits properties set properly. The "Response to values outside limits" must be set to Coerce or else the control will not force the value.

 

Data Entry Limits.png

 

I've also attached a version with some debug feedback. You were doing things correctly except for the coercion settings.

_______________________________________________________________
"Computers are useless. They can only give you answers." - Pablo Picasso
0 Kudos
Message 3 of 7
(2,089 Views)

thanks guys, but I *still* can't get this to work - SO CLOSE! The coercing business seems to be hosing up the sliders as each one gets new max/mins.  Any idea what I'm doing wrong?  I got a little desperate but didn't get anywhere... paul

Download All
0 Kudos
Message 4 of 7
(2,058 Views)

The problem is that there is only one set of data entry limits, and it applies to all sliders simultaneously.

When you change the limits, all sliders are coerced to be within those limits, not just the active slider.

I don't think there's not going to be a clean fix for this.

"If you weren't supposed to push it, it wouldn't be a button."
Message 5 of 7
(2,054 Views)

@paul_cardinale wrote:

The problem is that ... it applies to all sliders simultaneously.


Whoops, I guess I didn't really test it.

 


@paul_cardinale wrote:

I don't think there's not going to be a clean fix for this.


Here's my attempt at an "unclean" solution. It "works" in the strictest sense, but has problems when the sliders overlap and you grab the wrong one. You'll have to do better than this for your users I'm afraid...

_______________________________________________________________
"Computers are useless. They can only give you answers." - Pablo Picasso
Message 6 of 7
(2,050 Views)

 good ideas - maybe if I play around with it some more, I'll come up with something - much thanks, guys! paul

0 Kudos
Message 7 of 7
(2,020 Views)