LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

numeric text box:Change colour after calculation

How do you change the colour of a numeric text depending on the result of an arithmetic calculation ?
I assume its something to do with property node....Can some add to my basic program to do the following:
 
See attached picture of current basic program.I am using Ver 8.0.
 
If the output of x+y >5 then i want the output text box to turn Red.
If the output of x+y>5 then i want the output text box to turn Green.
The default colour should be white.
 
Regards,
               labtech5555
0 Kudos
Message 1 of 4
(2,195 Views)

The comparison can be done using a case structure (you can feed the numeric into the selector and use some syntax, available in the help, to select ranges).

The coloring can be using a property node. Right click on the control or the terminal and select Create>>Property Node. Then select the Numeric Text>>Text Colors>>BG Color property.


___________________
Try to take over the world!
0 Kudos
Message 2 of 4
(2,189 Views)


labtech5555 wrote:
If the output of x+y >5 then i want the output text box to turn Red.
If the output of x+y>5 then i want the output text box to turn Green.
The default colour should be white.

OK, this makes no sense at all. If x+y > 5 it cannot be red and green at the same time.
 
Here's some simple code that would make the background of the indicator red if the result is >5 and green otherwise.
Maybe you can modify it for waht you really want. (I cannot tell.) 😉
 

 
0 Kudos
Message 3 of 4
(2,168 Views)


altenbach wrote:
 
OK, this makes no sense at all. If x+y > 5 it cannot be red and green at the same time.

Ah, those pesky details...

___________________
Try to take over the world!
0 Kudos
Message 4 of 4
(2,153 Views)