LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Select Function Text String Color

Solved!
Go to solution

New to LabVIEW so apologize in advance if this is a basic question , I have a select function with a text string for the true/false cases.  For the false case I would like the color of the text string to be red vs. black for the true case.  I attempted to do this by just changing the color of the false string using the toolbar color palette.  However, this doesnt seem to work when I run the VI.  What am I missing?

0 Kudos
Message 1 of 9
(3,696 Views)

Simply using of toolbar palette color it wouldn't work. Try this with a property node.

Text Color.png

0 Kudos
Message 2 of 9
(3,669 Views)

@chughes119 wrote:

I attempted to do this by just changing the color of the false string using the toolbar color palette.  However, this doesnt seem to work when I run the VI.  What am I missing?


The wires on the block diagram only carry data, not formatting.  So you need to use a property node to set the colors of the string indicator based on the result.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 3 of 9
(3,646 Views)

Ok, thanks. I get the property node piece but how do I define the color based on the result?  This is the part that I'm struggling with.  If boolean is True from select function then color text string black.  If boolean is False from select function then color text string red.

0 Kudos
Message 4 of 9
(3,631 Views)

block diagram is attached.  i have the two elements for the black and red text case but not sure how to link them to the true and false text strings from the select function

0 Kudos
Message 5 of 9
(3,626 Views)

@chughes119 wrote:

but how do I define the color based on the result?


Use a Select function.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 6 of 9
(3,625 Views)

my string is not the same for the true and false case.

0 Kudos
Message 7 of 9
(3,620 Views)
Solution
Accepted by topic author chughes119

@chughes119 wrote:

my string is not the same for the true and false case.


That is completely irrelevant to your question about setting the text color.  Move your setting of the text color to be inside of the Event Structure with where you set the text.  You can use the same boolean for setting the color as you did for setting the text.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 8 of 9
(3,617 Views)

got it!  thanks so much for your help.  How to wire it was throwing me off.  I'm sure there is a more elegant way, but it works...

0 Kudos
Message 9 of 9
(3,607 Views)