Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn more

View all

Sign in to view all badges

SOLVED

Can Text Color Based on Value

MHaywood323
Level 2
Level 2

I have been looking for a way to change the Fields's Text Color Based on Value

if  Textbox = A     then  A will be blue

if Textbox = B     then B will be red

I just need help getting the if then code working, changing the color after that is easy

Any Suggestions ..

1 Accepted Solution
Correct answer by
Anonymous
Not applicable

To change the boder, add the following script on the exit event:

if(TextField1.rawValue == "Desired Value")
     TextField1.border.edge.color.value = "255,0,0";
.
.

To fill the color, add the following script on the exit event:

if(TextField1.rawValue == "Desired Value")
     TextField1.border.fill.color.value = "255,0,0";

View solution in original post

2 Replies
Correct answer by
Anonymous
Not applicable

To change the boder, add the following script on the exit event:

if(TextField1.rawValue == "Desired Value")
     TextField1.border.edge.color.value = "255,0,0";
.
.

To fill the color, add the following script on the exit event:

if(TextField1.rawValue == "Desired Value")
     TextField1.border.fill.color.value = "255,0,0";

View solution in original post

MHaywood323
Level 2
Level 2

Thank you alcdtrainer... so much!

This code Works from you:

if(N1.rawValue == "M")

     N1.border.fill.color.value = "255,0,0";

SO, I was able to figure out what i needed ....

if(N1.rawValue == "M")

     N1.font.fill.color.value = "255,0,0";