Skip to main content
sndstrm
Visitor II
September 16, 2022
Question

ScrollList only snapping Top/Left

  • September 16, 2022
  • 2 replies
  • 1700 views

Currently I'm designing a UI using TouchGFX and like the ease of use. But there are some limitations:

A ScrollList can only snap in the topmost (leftmost in horizontal mode) position, if not circular. I've designed dropdown menus, where due to limited place the scrolllist has to be above the box. So the snapping should be on the bottom for those.

For a list with 3 items visible above the box, you can scroll down, so only one item is shown, there will be two items space between the box and the last visible item.

So I'm missing a checkbox/option menu where I can select the scroll direction for those lists. It seems like there is no real workaround available via other API functions.

Correct alignment when all items are shown:

0693W00000SvZv8QAF.pngWrong alignment when scrolled upwards:0693W00000SvZvDQAV.png

This topic has been closed for replies.

2 replies

Osman SOYKURT
ST Technical Moderator
October 4, 2022

Hello sndstrm,

Indeed it's not possible with a scrollList item. However it's possible with a scrollWhell when playing with the selected Item Offset.

0693W00000UnJCOQA3.pngCan you try with that ?

/Osman

ST Software Developer | TouchGFX
wired
Senior II
October 4, 2022

If you try ScrollWheel, just be aware that when you stop scrolling, you will get a SelectedItemCallback even if you haven't done a keypress on an item. See here. There is no differentiation between the SelectedItem callback and the AnimateTo callback.