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
Highlighted
Regular Contributor
Posts: 52
Registered: ‎02-26-2013
My Device: Curve 9650,Bold 9900
My Carrier: Airtel

How to craete this layout in GridFieldManager ?

Hi I know how to add text in GridField manager but facing trouble in adding images in gridFieldManager like this image and all images should be focusable and clickable. 

Any code will be helpfull.

Thanks.

 

sample.png

 

Developer
Posts: 98
Registered: ‎08-17-2010
My Device: BlackBerry 8300 simulator
My Carrier: Vodafone

Re: How to craete this layout in GridFieldManager ?

Try to creat your own component using HorizintalFieldManager and add that field in GridLayout

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

Re: How to create this layout in GridFieldManager ?

Please define your problem exactly.  We don't know if your problem is the creation of the 'buttons', or the layout , or the focusing, or .....

 

In this case, I suspect the first problem is creating a Field that is a combination of an Icon and and some text.  If someone asked me to do this, I would create a custom Field what had both the text and the image, and I would paint both in my custom paint(), method.  Then the one Field could act like a button.  If you think this is a good idea, then you should start by trying to create a single button.  Use this KB article to help:

 

 http://supportforums.blackberry.com/t5/Java-Development/Create-custom-fields/ta-p/444962

 

You might find code in here helpful:

 

http://supportforums.blackberry.com/t5/Java-Development/Implement-advanced-buttons-fields-and-manage...

Regular Contributor
Posts: 52
Registered: ‎02-26-2013
My Device: Curve 9650,Bold 9900
My Carrier: Airtel

Re: How to create this layout in GridFieldManager ?

First thanks for your response.  Exactly sir i need to create a combination of image and text , and image acts like a button. i dont have idea how to manage this in gridfieldmanager or table layout manager.  i need to create like in above image.

 

 

 

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

Re: How to create this layout in GridFieldManager ?

Can we confirm that the Image acts as a Button and is focusable, and the text is just a description and will not be focused?