2025-05-29 12:50 AM
Hi everyone,
I’m running into a strange rendering issue in TouchGFX and could use your insights.
What I’m Seeing
I have a function that hides or shows several UI elements (e.g. buttons) and then calls invalidate() on them.
When I invoke this function from a touch button, everything works as expected: the elements disappear from the screen.
However, when I call the exact same function from my hardware-button within (handleKeyEvent()), the elements become non-interactive (I can’t touch them) but they remain visible on screen.
What I’ve Confirmed
The function is definitely being executed (the elements lose touchability) it means changes have applied.
I’m correctly calling element.invalidate() (and even invalidating the parent container).
If I defer the call using a flag and perform the update in handleTickEvent(), it works reliably. but I believe it is not a good approach.
What I’ve Tried
Calling the function via touchgfx::Callback<>
Triggering it with an “Action” in the Designer
Every approach applies the logical state change, but the visual update only appears when triggered by a UI button.
How can i solve this and what could be the possible issue here.