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
Posts: 6
Registered: ‎07-16-2012
My Device: Curve 9300 / Torch
My Carrier: Virgin
Accepted Solution

Adding images with a text description next to it

Hello everyone im trying to add images with a description for each of them. Im not sure how many images i will need but it will also be nice that i can scroll down in case they dont fit in the screen. something like this.

 

      |--------------|              this is the

      |                   |             description

      |   imgage  |             for the image

      |--------------|                  Smiley Happy

 

 

thanks in advance!!! I really appreciate any kind of help.

Developer
Posts: 19,636
Registered: ‎07-14-2008
My Device: Not Specified

Re: Adding images with a text description next to it

The easiest way to do this is to create a HorizontalFieldManager and then add to this, the Image in a BitmapField, and the text in a RichTextField.  Give this a go and see if it matches what you want. 

 

You can add these directly to your MainScreen and everything should scroll as you want.

New Contributor
Posts: 6
Registered: ‎07-16-2012
My Device: Curve 9300 / Torch
My Carrier: Virgin

Re: Adding images with a text description next to it

Alright thanks a bunch . i will give it a try when i get home . im the office lol Smiley Wink
New Contributor
Posts: 6
Registered: ‎07-16-2012
My Device: Curve 9300 / Torch
My Carrier: Virgin

Re: Adding images with a text description next to it

thanks again Peter for your help. I was doing some reseach and I figured out that probably using a GridFieldManager. Works as expected. the only problem that im having is that the elements added to the grid are to close to each other. is there any way we can set an specific space among those elements?

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

Re: Adding images with a text description next to it

Take a look into setMargin (a method of Field class). Built-in Managers always honor those.

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