Showing results for 
Search instead for 
Do you mean 
Reply
Solved! Go to solution
Highlighted

Change variable color depending on string?

[ Edited ]

Hi

 

Is it possible to change the color on a variable via a method?

E.g. If a string says "Empty" then the variable is green and "Full" gives red.

 ColorStatus.png

 

Thanks in advance

2 REPLIES
Solution
Solution
Accepted by topic author Engelhart
‎06-18-2017 05:15 AM

Re: Change variable color depending on string?

try
&CastStatus.color:=makeRGBValue(255,0,0) --simTalk 2.0 for red, 0,255,0 for green

or

ref(CastStatus).color:=makeRGBValue(255,0,0); -- old syntax

Steffen Bangsow
freelance simulation specialist  
web: www.bangsow.eu
mail: steffen@bangsow.net


Re: Change variable color depending on string?

Thank you, worked perfectly.