Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Adobe AIR Development

Posts: 165
Registered: ‎10-26-2010
My Device: BlackBerry® PlayBook™
My Carrier: .

Re: QNX List scroll

Instead of having to use the random timer, you may want to try Tweener's delay property to make it wait 0.01 seconds before executing the animation. Should make for shorter, less complicated code.
Posts: 32
Registered: ‎12-08-2010
My Device: Not Specified

Re: QNX List scroll

[ Edited ]

just call listname.drawNow() before scrolltoindex.


its the same like in flex where you have to call validateNow()

Posts: 249
Registered: ‎11-02-2010
My Device: PlayBook
My Carrier: -

Re: QNX List scroll

Ah yes, calling drawNow() before indexToScroll() works fine too indeed ! I used it at the end, that was my error... hehe

Posts: 12
Registered: ‎01-16-2011
My Device: Z10 Limited Edition
My Carrier: Play

Re: QNX List scroll

This is solution for SectionList:

var firstItem:ICellRenderer = sectionListComp.firstVisibleItem; 
var isHeader:Boolean = firstItem.isHeader;
var visibleSectionIndex:int = firstItem.section;
var visibleItemIndex:int = firstItem.index;
sectionListComp.dataProvider = roster;
if (isHeader)
        sectionListComp.scrollToIndex(visibleSectionIndex, 0);
        sectionListComp.scrollToIndexInSection(visibleSectionIndex, visibleItemIndex, 0);
New Contributor
Posts: 5
Registered: ‎07-07-2012
My Device: Playbook
My Carrier: Play

Re: QNX List scroll

Probably it's the best soluction I know.

Pawel "pauluZ" Szczepanek
BlackBerry Developer
Android Evangelist