How to use a text box for display only.

Support forum for MegunoLink
Posts: 16
Joined: Wed Jun 22, 2016 8:18 am

Tue Feb 20, 2018 9:03 pm

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.

Posts: 370
Joined: Mon May 26, 2014 10:58 am

Thu Feb 22, 2018 8:12 am

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 ... r-library/

Post Reply