2020-10-20 11:54 AM
Working on designing the GUI in such a way that need to change the color of the small circle to indicate the status and also to show the mode changes . If one mode is selected circle color should be green or else white ....... im trying to work on this but im unable to change the color. So if available please send me some examples..
Thank you
Solved! Go to Solution.
2020-10-22 12:56 AM
Hi!
Try with the following:
Create an interaction for the button with an Action -> Call new virtual function. Generate code and overwrite the function on the ScreenView.
void Screen1View::function1()
{
circle1Painter.setColor(touchgfx::Color::getColorFrom24BitRGB(125, 125, 255));
circle1.invalidate();
}
Don't forget to include:
#include <touchgfx/Color.hpp>
Regards.
GP
2020-10-22 12:56 AM
Hi!
Try with the following:
Create an interaction for the button with an Action -> Call new virtual function. Generate code and overwrite the function on the ScreenView.
void Screen1View::function1()
{
circle1Painter.setColor(touchgfx::Color::getColorFrom24BitRGB(125, 125, 255));
circle1.invalidate();
}
Don't forget to include:
#include <touchgfx/Color.hpp>
Regards.
GP
2020-10-22 02:20 AM
Hi,
Thank you for your response!!
I tried with the code you have shared and its working fine as expected.
2020-10-22 02:23 AM
Can you please help me out in splashing an image for 3 seconds in TFT LCD(the image should display for 3 seconds and then switch back to default screen).
Thank You
Komala
2020-10-23 02:49 AM
Is this your "splash-screen" ? you could also just have a dedicated screen to display that image, override handleTickEvent() in your view and when 3 seconds have passed, tell the presenter to go to a different screen.
/Martin
2020-10-26 01:21 AM
Thank you Martin,
Its working fine now .. Thank you for your support.
2020-10-26 01:22 AM
Hi Martin,
How do I scroll the values using hardware buttons as we are not using touch.
Should I need to use the scrollable container ?