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
Developer
jtp5120
Posts: 298
Registered: ‎05-02-2010
My Device: Bold 9700
My Carrier: Verizon

How do I prevent the screen's subordinate, vertical field manager (getMainManager) from scrolling?

How do I prevent the screen's subordinate, vertical field manager (getMainManager) from scrolling?

 

I can obtain the main Manager with:

 

public Manager getMainManager()
Retrieves this screen's subordinate, vertical field manager.
Use this method to retrieve the vertical field manager this screen uses to manage the list of fields shown in its scrollable section.

Returns: This screen's subordinate, vertical field manager.

 

However when I scroll within a nested VerticalFieldManager, the screen's subordinate, vertical field manager scrolls as well.

 

Thanks.

--Todd

Windows 7 Enterprise 64-bit (6.1 Build 7600) | Java SE Runtime Environment (build 1.6.0_24-b07) | Eclipse Version: 3.6.2 [M20110210-1200] | BlackBerry Eclipse Plug-in: 1.3.0.201102031007-19 | Java Compiler level: 1.3 | Targeting devices running OS 5 | Simulators: JDE 5.0 packaged 9700, 9630, 9300
Please use plain text.
Super Contributor
pp
Posts: 278
Registered: ‎11-04-2010
My Device: 4.5 and above
My Carrier: none

Re: How do I prevent the screen's subordinate, vertical field manager (getMainManager) from scrolling?

Hi,

 

 Give the style of that manager as NO_VERTICAL_SCROLL.  like this


    VerticalFieldManager vfm = new VerticalFieldManager(Manager.NO_VERTICAL_SCROLL) {
        protected void sublayout(int width,int height){
            super.sublayout(width, height);
            setExtent(Display.getWidth(),Display.getHeight());
        }
    };

 

and add all other components to this vfm. Later add this to mainscreen.

In mainscreen constructor also provide this

super(NO_VERTICAL_SCROLL | NO_VERTICAL_SCROLLBAR);

 

Thanks & Regards

             pp

Please use plain text.
Contributor
Roshni
Posts: 45
Registered: ‎12-20-2010
My Device: Not Specified

Re: How do I prevent the screen's subordinate, vertical field manager (getMainManager) from scrolling?

Hi Todd,

 

Try overriding the navigationMovement() method of your subordinate vertical field manager and give a "return true;"  statement in its block.  Something like this.

 

protected boolean navigationMovement(){

return true;

}

 

-Roshni

 

If solved then press Kudos.

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

Re: How do I prevent the screen's subordinate, vertical field manager (getMainManager) from scrolling?

I presume you are talking about a MainScfreen, in which case you do this in the constructor.  I think this useful KB article explains how:

http://supportforums.blackberry.com/t5/Java-Development/MainScreen-explained/ta-p/606644

 

Please use plain text.