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

Posts: 86
Registered: ‎05-21-2012
My Device: Blackberry 10 Dev Alpha
My Carrier: IDEA

How to scroll a manager on another manager

Hi all!


I have a problem. I have created a manager which has two editfields and a button. This manager should scroll on another manager. i tried using setVerticalScroll() method. But the manager below, is disturbing. Please tell me how to get this.....







- Raju
Regular Contributor
Posts: 92
Registered: ‎01-31-2012
My Device: curve 8520
My Carrier: vodafone

Re: How to scroll a manager on another manager

in the constructor pass Manager.HORIZONTAL_SCROLL
Posts: 19,636
Registered: ‎07-14-2008
My Device: Not Specified

Re: How to scroll a manager on another manager

I am sorry to say I do not understand what you are trying to do.  Can you try to explain again, perhaps with a picture? 

Posts: 2,268
Registered: ‎07-08-2009
My Device: various
My Carrier: various

Re: How to scroll a manager on another manager

Welcome to the forums!


First of all, determine which of the managers is/are scrolling. Managers created with VERTICAL_SCROLL and/or HORIZONTAL_SCROLL flags may be scrolling, as well as MainScreen without NO_VERTICAL_SCROLL (for more details about MainScreen, see here: MainScreen explained).


I say "may be" and not "is" because a Manager will not scroll unless it needs to display more than the screen space given to it allows. For example, a VerticalFieldManager created with VERTICAL_SCROLL style bit and the total height of its managed fields of 360 will not scroll if it is given the height of 480 pixels, but will scroll if it has only 320.


Managers created with VERTICAL_SCROLL / HORIZONTAL_SCROLL flags know that they can fit more than their on-screen dimensions allow and let their "children" have an almost infinite (0x3FFFFFFF) height / width, so a Manager with VERTICAL_SCROLL added to another Manager with VERTICAL_SCROLL will not scroll because it will be able to fit its children within the height given to it by its parent Manager.


Take a look at all your Managers on the way up to the Screen level, including Screen itself, and check which ones are scrolling and which are not. Those which are can be controlled using their setVerticalScroll() methods.

please click 'Accept Solution' on posts that provide the solution to the question you've posted. Don't say "Thanks", press 'Like' button instead!