2020-01-24 02:48 AM
Hello,
Why is this method protected? I want to use this item position to scroll the ScrollList, when cursor is at the bottom (using animateToItem). I use physical buttons to move in the ScrollList.
Must I modify Middleware TouchGFX code to make it public?
Just wondering if this is unelegant solution, is there proper way to do this in TouchGFX, without modifying library code? Thanks!
2020-01-24 04:45 AM
Hello,
I want to do exactly the same things ! For the moment, I've managed to do it by calling the drag event handler when the button is pressed.
what is painful is, you have to know from how many pixels you have between each item.
Here's the code used when button is pressed :
scrollList.handleDragEvent( DragEvent(DragEvent::DRAGGED,50,50,100,100));
A method to set scrollList to a specific item would be really appreciated!
Hey Martin!!
Theophile
2020-01-27 06:06 AM
animateToItem() ?
2020-01-28 02:08 AM
If you have a scrollList with severable item displayed on the screen at the same time, this will not move the liste until the item index correspond to an item that is not viewable. Or have I missed something ?
2020-01-28 11:46 PM
Yes. I solve this by scrolling to offset item. E.g. animateToItem() to item+N to get view to item.
P.S. I solved original problem by taking count of items in list, and using that to move the cursor when it goes out of the list range (selecteditem > nrofitems).
Only problem is that i need to manually update count number. Not too bad.