LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Set Individual Slider Marker Colors

Is there some way to programmatically set individual slider markers to different colors?  I have attached an example front panel showing what I am trying to achieve.  Thanks.

0 Kudos
Message 1 of 7
(3,566 Views)

Use a property node in a FOR loop to iterate through all sliders, autoindexing over an array of colors.

 

SliderColor.png

 

(Note that the second property is "slider Colors:FG color" )

 

0 Kudos
Message 2 of 7
(3,556 Views)

Thanks for your reply.  Your solution changes the slider color.  I need to change the scale MARKER colors similar to the JPG file I have attached.  I see no way to select on an individual marker and specify its color (e.g. set marker "8 -" to red).

0 Kudos
Message 3 of 7
(3,549 Views)

You could add a few more sliders, each with a customized narrow rectangular shape. Disable them so they can only moved programmatically, then set the positions and values and colors.

0 Kudos
Message 4 of 7
(3,530 Views)

Good idea.  I will configure multiple sliders to look like my desired colored markers and then lock them in place.

0 Kudos
Message 5 of 7
(3,495 Views)

Slider with Colors.JPG

 

Looking again at your picture, it seems that these values are static and pairwise define ranges. You probably could even hide the added sliders and play with the fill color.

 

SlidecOLORS.png

 

Or you could even just play with decorations.

 

 

0 Kudos
Message 6 of 7
(3,490 Views)

My solution uses 6 vertical sliders, with sliders and markers hidden, that are programmatically colored and positioned over the desired horizontal marker locations at runtime.  The desired marker locations and colors vary from run to run.  For technical reasons, my solution does not work for the general case.  So using one horizontal slider with multiple active sliders as markers seems like a good solution.  I have not tried the idea so I will update this post with the result when I am done.

0 Kudos
Message 7 of 7
(3,483 Views)