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
New Contributor
yfaway
Posts: 2
Registered: ‎07-07-2011
My Device: torch
My Carrier: Rogers
Accepted Solution

Cannot touch to scroll in ScrollPane

Hello all,

 

I am having a werid issue with the ScrollPane component. I am trying to create a variable height row list (which is not supported by the QNX list component). Each row is a Container object that contains one large font size label and one small font size label, one after each other. All the containers (rows) are then added to a big container (this one's width and height are set appropriately). Finally, the big container is added to the ScrollPane component through setScrollContent.

 

ScrollPane

   |__ Container

         |__ Container 1

                   |_ Big Label

                   |_ Small Label

         |__ Container 2

                   |_ Big Label

                   |_ Small Label

         ...



What I notice is that scrolling works perfectly if I touch to drag on the text in the big label. However, if I touch on the empty space outside the text, or the empty space between the characters (but definitely still within the area contained by the ScrollPane), scrolling doesn't work anymore. There is no event handling on any of the components.

 

Does anyone know what cause this?

 

Thanks,

Please use plain text.
Regular Contributor
Vemilyus
Posts: 54
Registered: ‎03-21-2011
My Device: 1st Gen BlackBerry PlayBook 16GB (Gift from RIM :D)
My Carrier: WiFi

Re: Cannot touch to scroll in ScrollPane

The issue you are adressing is actually quite common. If there is nothing, there is nothing to touch!

You could either create a sprite with some content (alpha=0) and relay its MouseEvents to the ScrollPane or add a fully transparent sprite to the ScrollPane. That should do the trick...

This is a signature. Don't expect anything fancy, for I would use an image if I could. But I can't, so cope with it...
Please use plain text.
New Contributor
yfaway
Posts: 2
Registered: ‎07-07-2011
My Device: torch
My Carrier: Rogers

Re: Cannot touch to scroll in ScrollPane

Thanks Vemilyus. It turns out that alpha = 0 won't register any mouse event. I had to use alpha = 0.01.

Please use plain text.