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 Contributor
kendrelaxman
Posts: 6
Registered: ‎08-27-2011
My Device: 9300
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..

 

Regards,

Laxmikant

Please use plain text.
Developer
StevenKader
Posts: 638
Registered: ‎02-03-2010
My Device: Z10 LE

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
Please use plain text.
Contributor
Misiek06855
Posts: 41
Registered: ‎08-19-2011
My Device: Bold 9000

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);

 

Please use plain text.
New Contributor
kendrelaxman
Posts: 6
Registered: ‎08-27-2011
My Device: 9300

Re: Reduce height of PicturScrollField

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

 

Thanks

Please use plain text.