2026-02-02 7:34 AM
Hello ST/TouchGFX team,
Our team have been using scroller widgets to display data that is lazily loaded from a persistent database. It works well, but since these widgets use 16-bit indexes, it limits the amount of rows that can be displayed to 32k. Given the way these widgets work, it's only necessary to keep the visible items in memory and the index is kept only as the first visible item's offset, increasing the index size would have minimal if not negligible memory impact, and since TouchGFX only runs on 32-bit ST MCUs, any arithmetic operations are done in 32-bit anyway so there should be no performance impact.
In fact, we've been able to hack a solution to this by modifying the provided framework headers and source files to these widgets. The only issue is that the TouchGFX generator is hardcoded to create the updateitem callbacks with int16 signature and there is no way to change this except for modifying the base classes -- which are overwritten every time the project is regenerated. There is also no way to prevent the generator from creating the callbacks, unlike buttons for example.
Therefore, we would like to request int32 indexes on scroller widgets to be supported by TouchGFX in future versions.
Best regards
Solved! Go to Solution.
2026-02-17 6:40 AM
Hello @FDigi ,
Thank you for your message and the workaround you've shared.
The reason we have int16 indexes is because we want to limit the ram usage to a minimum (but still keeping reasonably high number of indexes). Indeed we believe 65536 different indexes are already quite large, especially if you select from a list that you need to scroll. But you're right that if you need more indexes, then this widget is not matching your needs.
2026-02-17 6:40 AM
Hello @FDigi ,
Thank you for your message and the workaround you've shared.
The reason we have int16 indexes is because we want to limit the ram usage to a minimum (but still keeping reasonably high number of indexes). Indeed we believe 65536 different indexes are already quite large, especially if you select from a list that you need to scroll. But you're right that if you need more indexes, then this widget is not matching your needs.