2020-02-25 06:01 AM
Hi,
I would like to announce measurement results also by text and change the text color based on the results. Green text for a pass, red for failure. How could I do this?
Solved! Go to Solution.
2020-02-25 06:19 AM
#include <touchgfx/Color.hpp>
...
textArea.setColor(Color::getColorFrom24BitRGB(0xFF, 0x00, 0x00)); //Red
textArea.setColor(Color::getColorFrom24BitRGB(0x00, 0xFF, 0x00)); //Green
textArea.setColor(Color::getColorFrom24BitRGB(0x00, 0x00, 0xFF)); //Blue
2020-02-25 06:19 AM
#include <touchgfx/Color.hpp>
...
textArea.setColor(Color::getColorFrom24BitRGB(0xFF, 0x00, 0x00)); //Red
textArea.setColor(Color::getColorFrom24BitRGB(0x00, 0xFF, 0x00)); //Green
textArea.setColor(Color::getColorFrom24BitRGB(0x00, 0x00, 0xFF)); //Blue
2020-02-25 06:26 AM
Hi,
the textArea widget has the capability to change the text color.
textArea1.setColor(touchgfx::Color::getColorFrom24BitRGB(255, 0, 0)); //red here
To modify it directly in View you might need to include the path for the color setup (and do not forget to invalidate afterwards as well): #include <touchgfx/Color.hpp>