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

Java Development

Reply
Contributor
andemartini
Posts: 41
Registered: ‎11-08-2011
My Device: Blackberry Torch
My Carrier: ATT
Accepted Solution

No Scroll on Trackball Phone

[ Edited ]

On phones that don't have a touch screen, I'm having trouble with scrolling.  I have a Main screen that contains two vertical field managers one immediatly following the other.  Inside both of these managers are a bunch of labels.  I want to be able to scroll down the screen when the labels contain alot of text.   

 

Main Screen

|-----------------|

|  Inside vert  |

| manager 1  |

|-----------------|

| Inside vert   |

| manager 2  |

|                       |

-----------------

This works on touch screen phones but not with the trackball.  I just can't scroll anywhere with the trackball but I do see the little arrow at the bottom of the screen that indicates you should be able to scroll down.  Any ideas?

Please use plain text.
Developer
peter_strange
Posts: 19,601
Registered: ‎07-14-2008
My Device: Not Specified

Re: No Scroll on Trackball Phone

Tracked will only scroll onto focusable Fields.  So you have to have focusable Fields to do scrolling normally.  Add a NullField between your labels and the trackpad scrolling will start working.  Alternatively, make your labels focusable.

Please use plain text.
Contributor
andemartini
Posts: 41
Registered: ‎11-08-2011
My Device: Blackberry Torch
My Carrier: ATT

Re: No Scroll on Trackball Phone

Thank you for the response Peter.  Adding the null fields allows scrolling, but unfortunately the scrolling is not fine enough.  That is, a single scroll increment will jump too far down.  This happens when a single textfield contains many lines of text.  Is there some kind of scrollable textbox in blackberry?

Please use plain text.
Contributor
andemartini
Posts: 41
Registered: ‎11-08-2011
My Device: Blackberry Torch
My Carrier: ATT

Re: No Scroll on Trackball Phone

And how does the blackberry email client do it?  There is a nice cursor that moves through the text as you scroll.  Is this custom built for that app?

Please use plain text.
Contributor
andemartini
Posts: 41
Registered: ‎11-08-2011
My Device: Blackberry Torch
My Carrier: ATT

Re: No Scroll on Trackball Phone

[ Edited ]

So I figured out what to do.  Instead of use LabelField, I use an EditField.  Also, to prevent editing I call setEditable(false) on each EditField.

 

 

Please use plain text.
Developer
peter_strange
Posts: 19,601
Registered: ‎07-14-2008
My Device: Not Specified

Re: No Scroll on Trackball Phone

That works, but FYI in this sort of situation I use RichTextField, which is read only by default. 

Please use plain text.
Contributor
andemartini
Posts: 41
Registered: ‎11-08-2011
My Device: Blackberry Torch
My Carrier: ATT

Re: No Scroll on Trackball Phone

Ok, great thank you.

Please use plain text.