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


Thank you for visiting the BlackBerry Support Community Forums.

BlackBerry will be closing the BlackBerry Support Community Forums Device Forums on April 1st (Developers, see below)

BlackBerry remains committed to providing excellent customer support to our customers. We are delighted to direct you to the CrackBerry Forums, a well-established and thorough support channel, for continued BlackBerry support. Please visit http://forums.crackberry.com or http://crackberry.com/ask. You can also continue to visit BlackBerry Support or the BlackBerry Knowledge Base for official support options available for your BlackBerry Smartphone.

"When we launched CrackBerry.com 10 years ago, we set out to make it a fun and useful destination where BlackBerry Smartphone owners could share their excitement and learn to unleash the full potential of their BlackBerry. A decade later, the CrackBerry community is as active and passionate as ever and I know our knowledgeable members and volunteers will be excited to welcome and assist more BlackBerry owners with their questions."

- Kevin Michaluk, Founder, CrackBerry.com

Developers, for more information about the BlackBerry Developer Community please review Join the Conversation on the BlackBerry Developer Community Forums found on Inside BlackBerry.


Reply
New Developer
Posts: 36
Registered: ‎10-29-2009
My Device: Not Specified

scrolling is not wokring

Hi All,

 

In my screen I have a manager like this

 

1) header manger

2)

 VerticalFieldManager final_grid = new VerticalFieldManager(VerticalFieldManager.VERTICAL_SCROLL
                    | VerticalFieldManager.VERTICAL_SCROLLBAR|VerticalFieldManager.USE_ALL_HEIGHT|VerticalFieldManager.FOCUSABLE){
                protected void paint(Graphics g ) {
                        super.paint(g);
                        g.setColor(Scheme.getColor(Scheme.COLOR_LOAN_CRITERIA_LABELS));
                }
                protected void sublayout(int maxWidth, int maxHeight)
                {
                       maxHeight =  LoanXEngine.screenHeight-innerTopImage.getHeight()-Constants.LOAN_CRITERIA_LT_WAVE_HEIGHT;
                       maxWidth =  Constants.LOAN_CRITERIA_LC_CELL_BG_WIDTH;
                       Field field;
                       int numberOfFields = getFieldCount();
                       int x = Constants.LOAN_CRITERIA_LC_CELL_BG_X;
                       int y = 0;//Constants.LOAN_CRITERIA_LC_CELL_BG_Y;
                        
                       for (int i = 0;i < numberOfFields;i++) {
                             field = getField(i); //get the field
                             setPositionChild(field,x,y); //set the position for the field
                             layoutChild(field, Constants.LOAN_CRITERIA_LC_CELL_BG_WIDTH, Constants.LOAN_CRITERIA_LC_CELL_BG_HEIGHT); //lay out the field
                             y += Constants.LOAN_CRITERIA_LC_CELL_BG_HEIGHT;
                          }
                       
                         setExtent(maxWidth, maxHeight);
                      //super.sublayout(maxWidth, maxHeight);
                }

};

 

3)tailManager

 

 

such that my second manager final_grid shold only scroll. For final_grid , I have added  25 fileds . when I was focusing on the final grid and trying to scroll up and down to see all the fileds, I am not able to scroll it..

 

 

Please tell what is the error I am doing..

 

 

 

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

Re: scrolling is not wokring

Don't think I can help, but I have a few quesitons;

a) Are the Field in final_grid focusable?

b) should maxHeight, when specified in

setExtent(maxWidth, maxHeight);
be the value if y you have claculated as you iterate through all the Fields?

New Developer
Posts: 36
Registered: ‎10-29-2009
My Device: Not Specified

Re: scrolling is not wokring

Hi,

 

a)final_grid is focusable

b) If I am keeping   setExtent(maxWidth, y); then the tail manager that I am adding will not be visible . as my each filed height that I  am adding in final_frid is "39" . So thats why I used setExtent(maxWidth, maxHeight);

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

Re: scrolling is not wokring

a) I can see you make the Manager focusable, but that is actualy not relevant.  It is the Fields within the Manager that need to be focusable.  So are they?