Welcome!

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

Reply
Developer
jtegen
Posts: 6,541
Registered: ‎10-27-2010
My Device: HTC One, PlayBook, LE Z10, DE Q10
My Carrier: Verizon

QNX List Scroll Bar Position

Does anyone know of a way to get the current scroll bar position of a QNX List?  The scrollBarOffset is the physical position of the scroll bar in the list not the scrolled amount.  I am trying to place a control next to a list based on the selected item, and I am 95% there with my current approach, but the problem is that scrollIndexVisible does some funcky things when an item is selected near the bottom of the list (OK near the top).  If I knew how much a list if scrolled by and the height of each cell (known), then I can accurately convert to global coordinates correctly.

Please use plain text.
Developer
EraserX
Posts: 168
Registered: ‎01-13-2011
My Device: Not Specified

Re: QNX List Scroll Bar Position

You might consider making a custom list.  They aren't that hard.  You place as ScrollPane with a Sprite as it's "setScrollContent", where the Sprite acts as a container for your scroll stuff.  Then you can use scrollX or scrollY for the scoll position.

 

 

Please use plain text.
Developer
jtegen
Posts: 6,541
Registered: ‎10-27-2010
My Device: HTC One, PlayBook, LE Z10, DE Q10
My Carrier: Verizon

Re: QNX List Scroll Bar Position

I'll give that a shot and let you know how it goes.

Please use plain text.
Developer
agaripian
Posts: 133
Registered: ‎12-02-2010
My Device: Z10 & Dev Alpha C
My Carrier: T

Re: QNX List Scroll Bar Position

@jtegen - did you ever resolve this? I am having similar issues on BB10. I need to reset the scroll position on the QNX list after an update is made to the data provider of the list. The scrollToIndex() with an animation time of 0 doesnt always work properly.
---------------------------------------------------------------------
Developer of Stocks for Blackberry 10
Please use plain text.
Developer
jtegen
Posts: 6,541
Registered: ‎10-27-2010
My Device: HTC One, PlayBook, LE Z10, DE Q10
My Carrier: Verizon

Re: QNX List Scroll Bar Position

ScrollPane is not available in BB10 SDK, but the approach does generally work in a scrolled container. I agree that it is not 100% consistent. If you can get it to repeat, it would be worth a bug report to get it fixed. I moved onto a different approach since this just did not work well.
Please use plain text.