Hello again,
I just created a very simple project that enables me to switch from Screen1 to 4 different screens, with a ScrollList composed of 4 items. I will join this project to this post.
To explain quickly the most important points :
- To access the "Switch screen" functions (e.g. gotoScreen2ScreenSlideTransitionEast()), I created 4 invisible buttons on the first screen. Each of those buttons will trigger a switch screen interaction, so we can switch from screen1 to the 4 other screens. Thanks to that, we will be able to use those functions in the back-end code to switch screens whenever we want. This is a little work-around but I think that it's the easiest way to achieve what you wanna do.
- In Screen1View.cpp, you can take a look at the function scrollListItemSelectedHandler(). This function is called every time you select an item of the ScrollList, and provides the item index. To enable the switch screen process on my application, I simply implemented a switch case that calls the gotoScreen() method which matches the selected item.
- Finally, if you want, for example, to change the text displayed on each element of your list, please look at the setupScreen() method in Screen1View.cpp, and at the function updateText(int value), that I declared in CustomContainer1.cpp. It will help you to understand how to enable and use wildcards in TouchGFXDesigner, and how to update their values in the code.
Let me know if that helped you, or if you need more informations.
/Yoann