Change the visibility of a generated image?
Hello,
my problem is simple, but I don't seem to understand TouchGFX well enough to find the solution.
I have created a simple GUI with TouchGFX Designer. The GUI of this project consists of 1 screen "Screen1" with an image "image1". As usual, TouchGFX Designer adds this image1 in Screen1ViewBase.cpp.
I want to change the visibility of image1 at a certain point of my application sequence. For this, I have added the following function to Screen1View.cpp:
void Screen1View::ChangeImageVisibility()
{
if(Screen1ViewBase::image1.isVisible())
{
Screen1ViewBase::image1.setVisible(false);
}
else
{
Screen1ViewBase::image1.setVisible(true);
}
Screen1ViewBase::image1.invalidate();
}
When I call ChangeImageVisibility() from my application, the image is still visible. I checked in the debugger, ChangeImageVisibility() is called and executed.
For a quick check, I added a button in the TouchGFX Designer that and three interactions that make the image invisible and visible again after 1000ms. This button works as expected.
What am I doing wrong with ChangeImageVisibility()?
Thank you very much for your help in advance.
