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
New Developer
nnvnaveen
Posts: 36
Registered: ‎10-29-2009
My Device: Not Specified
Accepted Solution

how to move center part of the screen as scrollable

Hi,

I have a requirement like my screeen is devided in to 3 parts . 1) header part (top) 2)Bday part(center) 3) tail part(bottom)

 

I need to scroll only body part of the screen . my header part,tail shold not scroll they shold be appear on the screen always while scrlling.

 

If any one have sample code .Kindly help me out.

 

Rarards,

Naveen

"Life is Short . Love all . Don't hate anyone."

Please use plain text.
Developer
Guest
Posts: 146
Registered: ‎11-05-2008
My Device: Not Specified

Re: how to move center part of the screen as scrollable

Screen of the style will be no vertical scroll

For header part you can use vertical field manager with no scroll and override method sublayout

protected void sublayout(int maxWidth, int maxHeight)
{
                 maxHeight =  10;//height of the header potion
                  maxWidth = Graphics.getScreenWidth() ;
                  super.sublayout(maxWidth, maxHeight);
                  setExtent(maxWidth, maxHeight);     

and add to this manager to screen.

For body part you can use Vartical Field Manager with scroll style and override sublayout  method

and in the same way you can use your value of height which is applicable for scollable.

For trailer part use Vartical Field Manager with no scroll style and override sublayout  method in the same way

 

I think,it will help to you.

Please use plain text.