cancel
Showing results for 
Search instead for 
Did you mean: 

ScrollList getPositionForItem protected method, cant access

Tuoman
Senior II

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!

4 REPLIES 4
T. Alary
Associate

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

animateToItem() ?

T. Alary
Associate

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 ?

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.