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

Java Development

New Developer
New Developer
Posts: 14
Registered: ‎04-27-2013
My Device: null
Accepted Solution

MainScreen not scrolling

Hi, I am developing an App for OS 5 to 7.1.  I have a help screen that can be called by the user. This help screen simply adds a bunch of label fields to the screen. For OS 6 and higher, I can scroll up and down without a problem. But for my OS 5 models, I cannot scroll at all.


I presume the problem is that MainScreen extends ScrollView and ScrollView came out in API 6.  So how do I let the user scroll through label fields in API 5?  Must I add nullfields that are focusable?



Posts: 354
Registered: ‎06-05-2013
My Device: Blackberry Z10
My Carrier: Vodafone

Re: MainScreen not scrolling

scroll is not available in os 5
use like this
LabelField labelField = new LabelField("Helllo", LabelField.Focusable);
add as mush as fields u can using Focusable
Posts: 19,636
Registered: ‎07-14-2008
My Device: Not Specified

Re: MainScreen not scrolling

There  was a change in OS 6 that enabled scrolling of non focusable FIelds.  So for OS 5.0 adding a NullField would resolve your problem. 


As developer_aman_arora suggested, another solution is to make your LabelFields focusable. 


But for me a better solution is to use RichTextFields instead of LabelFields which are scrollable in all OS levels and give some visual indication of where the scroll actually is.  And then you get line by line scrolling for multiple line text fields too.