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
Regular Contributor
Posts: 63
Registered: ‎07-01-2010
My Device: BlackBerry Curve 8900
My Carrier: Orange

Left align in GridFieldManager?

Hi,

 

I have a GridFieldManager with 2 columns and 3 rows with Buttons in each cell. I've tried creating my buttons using BurronField.USE_ALL_WIDTH and ButtonField.FIELD_LEFT but they are still aligned in the centre both horizontally and vertically.

 

Does anyone know how to make the buttons in a column align to the left ie so their left hand edges are all aligned to the left.

 

Thanks!

Contributor
Posts: 10
Registered: ‎02-18-2011
My Device: Not Specified

Re: Left align in GridFieldManager?

Put a vertical field manager in each cell that takes up all the space available, then define the alignment in there.

Highlighted
Contributor
Posts: 31
Registered: ‎08-30-2011
My Device: 9810
My Carrier: idea celluler

Re: Left align in GridFieldManager?

You can use style before adding the fields 

as 

 


GridFieldManager gfm=new GridFieldManager(1,2, USE_ALL_WIDTH);

gfm.add(new LabelField("new label"),Field.FIELD_LEFT);

gfm.add(new LabelField("new label"),Field.FIELD_LEFT);

 

add(gfm);

 

it works.

 

regards,

Manish Kumar