LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Change slider color in array?

I have some sliders in an array and want to change
the color of the sliders (each slider the same color),
but I can't find the property to do that.
When I have a single slider, then it's there
(Fill Color), but it's gone, when I put the slider in
an array...
How to do that?

Best regards
Gerd
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 1 of 8
(3,449 Views)
Hi Gerd

I couldn't reproduce your behaviour. I've tested it in LV 6.1 and 7.0 and it works with both! I've attached a VI. Check yourself.

Regards,
Luca
Regards,
Luca
Message 2 of 8
(3,449 Views)
Hello Luca,

thanks for your example.
Now I know, what's "wrong": You have to create the
property node by right-clicking the slider on the
front panel... I (normally) work in the block diagram
and there I couldn't create a property node of a
single slider in an array.
Does anybody know of a way to do this or do I always
have to change to the front panel to do this job?

Best regards
Gerd
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 3 of 8
(3,449 Views)
Hi Gerd,

You've to do it always in the front panel. When you do it from the block diagramm, then you've access to the properties of the array itself and not to the elements in the array.

Regards,
Luca
Regards,
Luca
0 Kudos
Message 4 of 8
(3,449 Views)
No other way.

Ben
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 5 of 8
(3,449 Views)

Same issue as above, but the solution doesn't seem to work for me. it's multiple slides in an array..

Green is good (within range) Red is caution near the edge of the range.

Problem

if conditions are met they all change colours (flicker)

the idea is to only change the slide color of the ones out of tolerance.

Full Story

17 sensors with ~50mm of travel output is an array. I want the slide to turn green if between 5mm and 45mm and red. if it's outside those values. See example vi attached. I can't give you my original code as it would not run without the instruments present, but this should give you an idea. 

 

Thanks

0 Kudos
Message 6 of 8
(2,154 Views)

So you want one slider in the array to be one color, and a different slider in the array to be a different color?

 

It can't be done.  All elements in an array have to have the same properties.  The only thing that can be different is the value.

 

You could try to create a cluster of sliders, and then color each slider independently.

 

PS:  It makes a lot more sense to use In Range and Coerce rather than separate comparisons.  You can use scalar constants rather than arrays of the same constant.

0 Kudos
Message 7 of 8
(2,150 Views)

Try this.  The array element is a cluster containing a slider (in front) and a color box (in back of the slider).

The slider fill option is set to Fill Above and the background of the slider is set to transparent.

Also, the slider has been customized to have 4 opaque flat boxes around it (to hide the color box everywhere except at the slider).

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