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 Developer
Posts: 120
Registered: ‎05-20-2011
My Device: Touch 9800
My Carrier: Vodafone

GridField Problem

[ Edited ]

Hello Every Body,

 

I am facing a problem while putting buttons in grid field.

My issue is, in my home screen, i have four text fields and they are put in a vertical field manager.

Then i have 2 horizontally placed buttons next to the text fields. After that i have two more buttons placed in a vertical field manager.

Now i have placed text field containing manger , then horizontal field manager , then a vertical field manager into a grid field manager.Everything is fine till now and they are placed systematically on the simulator. But when i press to view the left and right arrows to view the upcoming and previous mesages , my buttons starting to move to the right .

I noticed one thing if the text size is small den dis prolem doesn't persists. But if the text is large then the problem arises.

I have use the getpreferred width method, size of the GFM is fixed but nothing worked.

Please members need ur kind support.

 

Please find attached:

1). Normal Home Screen.

2). Home screen with non aligned buttons.

Amar
Regular Contributor
Posts: 96
Registered: ‎06-09-2011
My Device: sdk 9800
My Carrier: java development

Re: GridField Problem

sorry ,i am not getting wht exactly u want?

 

Can u pls tell me in short ,wht exactly u want to do?

Press the Kudos button (star) on the left side to thank and
please mark the Thread as solved if its solved...


Thanks and Regards
Nagarjuna
New Developer
Posts: 120
Registered: ‎05-20-2011
My Device: Touch 9800
My Carrier: Vodafone

Re: GridField Problem

When i placed three vertical mangers in a grid field in which first one contians text that can be short or long....and rest are buttons placed parallely to them.....when the length of text is long, buttons position changes from thier original position. please see the attatached images you will able to get my point.

Amar
Regular Contributor
Posts: 96
Registered: ‎06-09-2011
My Device: sdk 9800
My Carrier: java development

Re: GridField Problem

ok, i got ur point now

 

This problem can be solved by adjusting the layout parameters for the Field Managers

 

just try by increasing or decreasing the values in the layout method and find the exact values which will set ur Field managers perfectly

 

 

 

Thank u

Press the Kudos button (star) on the left side to thank and
please mark the Thread as solved if its solved...


Thanks and Regards
Nagarjuna
New Developer
Posts: 120
Registered: ‎05-20-2011
My Device: Touch 9800
My Carrier: Vodafone

Re: GridField Problem

Thanx for the reply ,

But the thing is i had already set the values of the managers ,even the grid field is of fixed size,text comes in that specified width but sliding problem of the buttons is not resolved by this approach.

 

Thanks and Regards

Hobby

Amar
Regular Contributor
Posts: 96
Registered: ‎06-09-2011
My Device: sdk 9800
My Carrier: java development

Re: GridField Problem

ur field parameters are not fixing with respect 2 ur screen...it is some what critical to manage with 2 field managers..

 

so do one thing

 

 

take any one field manager as parent and consider all ur buttons and textfields as childs and implent the sublayout method with the for loop[int numberOfFields = getFieldCount(); ,for (inti = 0;i < numberOfFields;i++)]

adjust the setPositionChild(field,x,y) and layoutChild(field,100,100)......here 100,100 is sample u can write as ur convenient

 

 

 

thanx

Press the Kudos button (star) on the left side to thank and
please mark the Thread as solved if its solved...


Thanks and Regards
Nagarjuna
New Developer
Posts: 120
Registered: ‎05-20-2011
My Device: Touch 9800
My Carrier: Vodafone

Re: GridField Problem

Thanx for ur kind help...i ll be implement this method and then get back to you......

Amar