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 Contributor
Posts: 6
Registered: ‎08-27-2011
My Device: 9300
My Carrier: Aircel
Accepted Solution

Reduce height of PicturScrollField

Hello All,

I am working on an application where I have to work on PicturescrollField.

But the size and height of scroll field is very huge it almost fits half the screen if you are targetting for 320X240


Please let me know how can I reduce the height of picturescrollfield??


Thanks in advance..




Posts: 656
Registered: ‎02-03-2010
My Device: Z10 LE
My Carrier: Rogers

Re: Reduce height of PicturScrollField

[ Edited ]

When you create the picturescroll field pass in the size you want :


_pictureScrollField = new PictureScrollField(width, height) 


Hope this helps.

Steven Kader at JaredCo
   Follow me on Twitter    |     Mipixi.com :  Web App for Photo Sharing
Posts: 41
Registered: ‎08-19-2011
My Device: Bold 9000
My Carrier: Plus

Re: Reduce height of PicturScrollField

[ Edited ]

Try this:

        final int myWidth=Display.getWidth(); //You can use any with, but focus will be always on center of //screen width
        final int myHeight=200;
        PictureScrollField pic = new PictureScrollField(myHeight/2,myHeight/2);
        //adding entry for pic ... //... VerticalFieldManager manager=new VerticalFieldManager(Field.USE_ALL_HEIGHT|Field.USE_ALL_WIDTH){ protected void sublayout(int maxWidth, int maxHeight) { super.sublayout(myWidth, myHeight); } }; manager.add(pic); add(manager);


New Contributor
Posts: 6
Registered: ‎08-27-2011
My Device: 9300
My Carrier: Aircel

Re: Reduce height of PicturScrollField

yes that helped me a lot. actually it reduces the size of Picture. although its ok and very helpful.