Page 2 of 2

Re: How to use a text box for display only.

Posted: Tue Feb 20, 2018 9:03 pm
by Joe
Hi all,

could someone please give me a short example how to change the text colour depending on a value? I can't really find an explanation in the manual.
In practical I'd show some voltage measurements and change the text colour if the voltage goes under a certain value.

Thanks for helping.

Joe

Re: How to use a text box for display only.

Posted: Thu Feb 22, 2018 8:12 am
by philr
Hi Joe, for example

if (Temperature== 10) Panel.SetForeColor("MyTextbox", "Green");
else if (Temperature== 11)Panel.SetForeColor("MyTextbox", "Yellow");
else if (Temperature== 12) Panel.SetForeColor("MyTextbox", "Red");
else Panel.SetForeColor("MyTextbox", "Blue");

More commands are documented here
https://www.megunolink.com/documentatio ... r-library/

Cheers
Phil