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
Contributor
ashutosh_porchys
Posts: 29
Registered: ‎04-01-2011
My Device: 9800

GridFieldManager Problem

Hello Everyone

I am getting a strange problem. I have a GridFieldManager of Fixed size with a single row and 3 ObjectChoiceFields and ButtonField added to the four coloums respectively.
Now, whenever I choose any value from any OCF, the fields(all 4) shift a little towards right and gap between them seems to strech. This process repeats every time I make a choice.

Can any one please help me with whats going on here??

Thanks
With Best Regards
Ashutosh Srivatava
Regular Contributor
nag
Posts: 96
Registered: ‎06-09-2011
My Device: sdk 9800

Re: GridFieldManager Problem

Hi Ashutosh,

 

 

try with

Manager.NO_HORIZONTAL_SCROLL

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
Contributor
ashutosh_porchys
Posts: 29
Registered: ‎04-01-2011
My Device: 9800

Re: GridFieldManager Problem

Thank You very Much Sir,

  Basically I m making an application, where I have the following

1)MainScreen  having 9*9 grid ,contains many Icon (Send money (1,3)and MyAccount(2,3)), where (1,3) and (2,3) icon     position

2)Now when we clicks on send money module,and back to MainScreen the Send money icon(1,3) shift to its right of the screen, Send Money Module also contains a grid of 9*1.

  

3)And the hint given by you works ,when I select the MyAccount (2,3) and back to the main screen.

 

I have Used Like this.

Note: FocusableButtonField is the Custom class for Image ButtonField.

FocusableButtonField("On Focus","Off Focus",width,height);    

 

gridMainMenu=new GridFieldManager(3, 3, 1|GridFieldManager.NO_HORIZONTAL_SCROLL);
        if(a<=360)
        {
            cbbf_generatewigicode=new FocusableButtonField("generatecodeSD.png","generatecodeSL.png",100,118);   
            cbbf_activewigicode=new FocusableButtonField("activecodeSD.png","activecodeSL.png",100,118);
            cbbf_sendmoney=new FocusableButtonField("sendmoneySD.png","sendmoneySL.png",100,118);
            cbbf_sendgift=new FocusableButtonField("sendgiftSD.png","sendgiftSL.png",100,118);
            cbbf_scanad=new FocusableButtonField("scanadSD.png","scanadSL.png",100,118);       
            cbbf_myaccount=new FocusableButtonField("myaccountSD.png","myaccountSL.png",100,118);
            cbbf_search=new FocusableButtonField("searchSD.png","searchSL.png",100,118);
            cbbf_setting=new FocusableButtonField("utilitiesSD.png","utilitiesSL.png",100,118);
            gridMainMenu.setMargin(Display.getHeight()/30,0,0,Display.getWidth()/24);
            gridMainMenu.setColumnProperty(0, GridFieldManager.FIXED_SIZE,105);       
            gridMainMenu.setRowProperty(0, GridFieldManager.FIXED_SIZE, 122);   
            gridMainMenu.setColumnProperty(1, GridFieldManager.FIXED_SIZE,105);       
            gridMainMenu.setColumnProperty(2, GridFieldManager.FIXED_SIZE,105);   
            gridMainMenu.setRowProperty(1, GridFieldManager.FIXED_SIZE, 122);
            gridMainMenu.setRowProperty(2, GridFieldManager.FIXED_SIZE, 122);
        }

Thanks
With Best Regards
Ashutosh Srivatava
Regular Contributor
nag
Posts: 96
Registered: ‎06-09-2011
My Device: sdk 9800

Re: GridFieldManager Problem

hmm...then try No_Scrollable or No_Scroll instead of Horizontal_Scrollable

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