CSD!@&@À?à?!@&@À?à?–function OnPostUpdate() { try { if (txtValue.Value<=0) { txtValue.FillColor = rgb(255, 255, 0); // yellow shpIndicator.FillColor = rgb(255, 255, 0); // yellow shpIndicator.LineColor = rgb(255, 0, 0); // red } else { // use normal color txtValue.FillColor = rgb(0, 0, 0); // black shpIndicator.FillColor = rgb(255, 255, 255); // white shpIndicator.LineColor = rgb(0,0, 0); // black } } catch(e) { debugmsg(e.message); } finally { // do nothing } } // Support function function rgb( r, g, b) { return r + (256 * g) + (65536 * b); } // another way to do it function ColorValue(fieldToColor,fieldWithValue) { try { if(fieldWithValue.Value<=0) { fieldToColor.FillColor= rgb(255, 255, 0); // yellow } else { fieldToColor.FillColor= rgb(0, 0, 0); // black } // regardsless of actual value, return the value to show the output return fieldWithValue.Value; } catch(e) { debugmsg(e.message); } finally { // do nothing } } OnPostUpdateBox1ð?ÀÀÀVerdana0@ð?þ?ð?@ø?@ø?þ?Valueð?ValueVerdana$@ì?ð?ì?UUUUUÕò?õ?UUUUUÕò?õ?ð?txtValueð?Verdana$@ö?ð?ö?ò?@ò?@ð?Text1ð?Changing color based on valueVerdana$@ì?è?ì?«ªªªªªí? @«ªªªªªí? @è? shpIndicatorð?ÿÿÿVerdana$@@ð?@ô? @ô? @ð?Text2ð? Another wayVerdana$@ì?ú?ì?UUUUUÕü?«ªªªª*ý?UUUUUÕü?«ªªªª*ý?ú?txtValueToColor'js:ColorValue(txtValueToColor,txtValue)ð?0Verdana0@ò?@ò?UUUUUU@€õ?UUUUUU@€õ?@