Showing results for 
Search instead for 
Did you mean: 

Duplicate Items when using Scroll wheel

Associate II


  • TouchGFX v4.23.0
  • STM32H747
  • Scroll wheel with selected item template



I dynamically set the number of items in the scroll wheel using the function setNumberOfItems() so in the TouchGFX designer I set the Number of Items to 0.  As an example, I am displaying 4 items but have 8 to choose from.  When the scroll wheel is first shown, the first 4 items (index 0 - 3) are rendered correctly.  When I push down, the screen correctly shifts and shows items 1 - 4.  When I push down again, the first item (index 2) is shown in the first, selected position and is shown in the 4 position as well.  

As I continue to navigate down in the list, sometimes there are other duplicates, sometimes the list is correct.



I tried a few different things but setting the Number of Items in the designer to 2 (I didn't try any other value) solved the duplicate glitch.


So it seems, that having the Number of Items set to 0 is what causes this issue in the first place.


Hello @brymat ,

I tried to replicate the issue you mentioned, but I was not successful. Is it possible for you to share a simple project that demonstrate the problem?

Thank you

Mohammad MORADI
ST Software Developer | TouchGFX
Associate II


I have attached a simple example based on the Scroll Wheel example in TouchGFX and targeting the STM32H747I discovery kit.


If you switch to the "Scroll Wheel" option in the display, you will see the duplicated values in the list right away.  Scrolling back and forth shows many odd values in the list.  Although the selected value is always correct.

I have also attached a photo as an example.  In the photo, I would have expected to see the values 22, 23, 24, not 22, 22, and 20.




i have had kind of similar issue in the past when using the "number picker" that has been shared in the past from an STEmployee.


Its number picker has two functions:ScrollWheelUpdateCenterItem and ScrollWheelUpdateItem


The first is for the "seeing" item and the other is for the not "seeing" items. 


I guess you are not updating well the second (or equivalent) part/function. 


I always set the item count in the TouchGFX Designer to a value higher than the visible item count to cope with this bug you mentioned.

Also, when changing the item count at runtime I always do:




To handle some update-problems. I don't remember the details anymore.

When this account seems to be inactive, try @tdecker2 - ST can't change mail addresses, so I had to create a new account.