01-22-2019 08:09 PM
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?
Solved! Go to Solution.
01-22-2019 10:59 PM - edited 01-22-2019 11:00 PM
Simply using of toolbar palette color it wouldn't work. Try this with a property node.
01-23-2019 07:15 AM
@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.
01-23-2019 10:34 AM
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.
01-23-2019 11:10 AM
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
01-23-2019 11:10 AM - edited 01-23-2019 11:11 AM
@chughes119 wrote:
but how do I define the color based on the result?
Use a Select function.
01-23-2019 11:18 AM - edited 01-23-2019 11:20 AM
my string is not the same for the true and false case.
01-23-2019 11:30 AM
@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.
01-23-2019 12:13 PM
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...