Possibility of Dynamically Creating UI Components Pre-Screen Initialization in TouchGFX
Hello TouchGFX Community,
As part of my project, I'm developing a menu system within a TouchGFX application. The menu is intended to display either ToggleButtons or standard Buttons based on configurations set by the user. The aim is for the UI to dynamically adapt to these configurations, showcasing different functionalities as per the user preferences.
I have read, that creating UI components dynamically on the screen at runtime is forbidden by TouchGFX design, however I've been exploring the possibility of dynamically generating these components before the screen initializes, tailored to the user's setup.
I've had success with dynamically creating buttons pre-initialization, but only when they are of the same type, so I could keep them in the same array/vector.
I know that the other route would be to predetermine all possible buttons in the .hpp file and manage their visibility according to user configurations, but I would prefer to avoid this method to save some of that memory.
Given this, I'm curious if anyone has insight or experience with dynamically generating different types of UI components in TouchGFX, particularly before the screen is fully initialized. Is there a known approach or documentation that might have eluded me?
Any advice, shared experiences, or pointers to relevant resources would be immensely appreciated. Thank you for your time and assistance!
