I’m having trouble with the below problem:
Suppose a textbox = “5” , i want to make the text “5” to be red
Suppose a textbox = “4” , i want to make the text “5” to be green
Suppose a textbox = “3” , i want to make the text “3” to be blue.
I kinda know i have to put some css code in “style”, not sure how. Can someone point to the right direction?
You should be able to set your container or other parent element to different CSS classes (for red, green or blue text) based on the string value. The following widget should help:
Thanks for your comments. However, i’m using a old modeler. Mendix 5.19. Wondering if any of the CSS code can solve this problem?
I prefer the Enum Class widget ; https://appstore.home.mendix.com/link/app/2641/ , but it is also worth to check out the Dynamic Classes widget as suggested by Michael Giller
One quick and easy way to do this is create text boxes for all your different options (i.e. red, blue, green) and set their visibility to only display based on their contents (Something like: contains($textObj/text, ‘3’) then make blue text option visible)