07-22-2011 08:24 AM - edited 07-22-2011 08:29 AM
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.
07-25-2011 12:42 AM
sorry ,i am not getting wht exactly u want?
Can u pls tell me in short ,wht exactly u want to do?
07-25-2011 01:09 AM
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.
07-25-2011 01:14 AM
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
07-25-2011 01:30 AM
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
07-25-2011 02:08 AM
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