2024-10-16 06:24 AM
Hi there Touchgfx team!
I have these screens
I already implemented all the navigation. When I'm in volume screen, if I start pressing the up/down arrow buttons, the read widgets appears again. Is there any way to avoid this different than calling invalidate() every single time?
All those 4 screens are developed inside a single screen. Based on the user input, I just change their state to visible/invisible.
Thanks a lot in advance
Solved! Go to Solution.
2024-10-16 07:36 AM
Hello @JPabl.1,
As you mentioned, you just need to change the visibility state of the READ widget. There should be a misconfiguration in your logic that causes the READ widget appear if the up/down buttons are pressed. You can also call invalidate() only for the widgets you are changing (instead of the whole screen, which can save a lot of unnecessary calculations).
So please, ensure you are using SetVisible(bool visibility) in the correct order. If you still have issues, please share the part of your code that is causing the issue.
I hope this helps you!
2024-10-16 07:36 AM
Hello @JPabl.1,
As you mentioned, you just need to change the visibility state of the READ widget. There should be a misconfiguration in your logic that causes the READ widget appear if the up/down buttons are pressed. You can also call invalidate() only for the widgets you are changing (instead of the whole screen, which can save a lot of unnecessary calculations).
So please, ensure you are using SetVisible(bool visibility) in the correct order. If you still have issues, please share the part of your code that is causing the issue.
I hope this helps you!
2024-10-16 01:55 PM
I missed a invalidate() call, thanks
2024-10-17 02:28 AM
Glad to hear you have fixed it :D
You're very welcome!
Best regards,