2019-11-25 06:48 AM
Hello,
I have a screen that include scrollWheel and items from a custom container. I can change Number of items from touchgfx GUI. And i can see the code behind in screenViewBase.hpp. (In this example i have 6 cumtom container items for scrollWheel)
touchgfx::DrawableListItems<menuItem, 6> scrollWheel_timeSettingsMenuListItems;
But i need to change number of items programmatically in run time. is it possible and what is the way of it?
Thanks and Best Regards,
Murat
2019-11-26 02:27 AM
Hi
You can use:
scrollList1.setNumberOfItems(5);
For example, to set the number of elements to '5'.
2020-09-18 10:53 AM
I realize this is an old question, but I have one that is related to it. Does setNumberOfItems work()? When I call it, I get a Hard Fault. I see that it is called in my base file already, so can this function be called twice?
2020-09-22 07:48 AM
Hi
In my case at least it is working, i am calling that when setting up a modal screen to adjust the size of the list. By default via designer is 7, and when calling the modal i am setting it to 14 (Too lazy to update the designer to the correct value :grinning_face_with_sweat: )
I am still using the version 4.12.3 of TouchGfx.