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
Developer
Posts: 70
Registered: ‎08-10-2009
My Device: Not Specified

Nested Managers - keeping Manager from scrolling

I have a screen with 3 managers.

 

One Main Custom Manager [MCM] contains a VFM and another Manager M laid out beside the VFM.

 

 

                       MCM

----------------------------------------------

|                                    |                    |

|                                    |                    |

|           VFM                 |        M         |

|                                    |                    |

|                                    |                    |

----------------------------------------------

 

 

The VFM contains an ObjectListField and the user can scroll through this ObjectListField.

 

The major issue that I am having is that the Manager M needs to be docked, be static, ie, not scroll with the ObjectListField to it's left, and I don't know how to get this behaviour. Everytime I scroll past the bottom of the ObjectListField, the Manager M scrolls with it.

 

I have tried all sorts of things and searched the forums for an answer to this problem.

 

Any help would be greatly appreciated.

 

Thanks.

Ahmed

Highlighted
Developer
Posts: 1,807
Registered: ‎04-28-2009
My Device: Z10 (STL100-4)-10.3.2.858, Z10 (STL100-3)-10.3.1.2576, Z30 (STA100-5)-10.3.1.2582, Passport (SQW100-1)-10.3.1.2576, PlayBook (16GB)-2.1.0.1917
My Carrier: Verizon

Re: Nested Managers - keeping Manager from scrolling

You might need to create a manager that wraps your VFM and M.

 

I don't have a ton of experience but what I do know is that the default managers, when allowed to scroll, can go to nearly unlimited sizes, thus making it so that when you scroll to the end of the ObjectListField in the VFM, it passes it off to the VFM (instead of simply stopping the ObjectListField) and continuing to scroll taking your M with it.

 

I don't know if that helps or if I'm leading you in the wrong direction because of my inexperience but hope it might shed some light on what the problem might be.

---Spends time in #blackberrydev on freenode (IRC)----
Three simple rules:
1. Please use the search bar before making new posts.
2. "Like" posts that you find helpful.
3. If a solution has been found for your post, mark it as solved.
--I code too much. Well, too bad.
Developer
Posts: 70
Registered: ‎08-10-2009
My Device: Not Specified

Re: Nested Managers - keeping Manager from scrolling

what do you mean when you say a manager that wraps the VFM, and M ?

 

Anyone else have experience with this problem, it would really help to understand the behaviour and solve this problem

Developer
Posts: 2,268
Registered: ‎07-08-2009
My Device: various
My Carrier: various

Re: Nested Managers - keeping Manager from scrolling

I don't know why your side Manager would be scrolling at all - unless your main Custom Manager is scrolling (i.e. has Manager.VERTICAL_SCROLL style bit set).  Make sure that you create it with Manager.NO_VERTICAL_SCROLL (or call super(NO_VERTICAL_SCROLL)).  Otherwise what you think as your left VFM scrolling will in fact be your Main Manager scrolling, making your side Manager scroll along.

 

Good luck,

    Arkady.

 

P.S.: Please give kudos (the black star on the left) to the posts that helped you.  Mark as solution the posts that solved your problem.

----------------------------------------------------------
please click 'Accept Solution' on posts that provide the solution to the question you've posted. Don't say "Thanks", press 'Like' button instead!
Developer
Posts: 70
Registered: ‎08-10-2009
My Device: Not Specified

Re: Nested Managers - keeping Manager from scrolling

Even setting the styles as suggested doesn't help solve the problem.

 

Keep the suggestions coming.

 

I have tried a whole bunch of possible solutions, nothing seems to work, I don't know why the Manager on the right scrolls.

 

 

Developer
Posts: 2,268
Registered: ‎07-08-2009
My Device: various
My Carrier: various

Re: Nested Managers - keeping Manager from scrolling

You'll have to be more specific with your description of the code for us to "keep the suggestions coming".

 

Like I said, there is noting that would specifically tie a Manager to the other Manager's scrolling.  If you could post some code excerpts showing how you create and populate your Managers (including what is added to what), that would be useful.  Also, look for any specific setVerticalScroll() calls - if it scrolls a Manager containing the one to be "docked", you'll get what you describe.

----------------------------------------------------------
please click 'Accept Solution' on posts that provide the solution to the question you've posted. Don't say "Thanks", press 'Like' button instead!
New Developer
Posts: 137
Registered: ‎02-04-2010
My Device: Tour 9630
My Carrier: verizon

Re: Nested Managers - keeping Manager from scrolling

I'm having the same issue. Seems like my VFM is thrown off by the ObjectListField. However, it works fine with my regular data entry forms. class BackgroundScreen extends VerticalFieldManager implements Global { /** * Constructor. */ BackgroundScreen() { super(VerticalFieldManager.NO_VERTICAL_SCROLL);
Developer
Posts: 723
Registered: ‎03-12-2009
My Device: Playbook

Re: Nested Managers - keeping Manager from scrolling

Your problem is that MCM is scrolling and not VFM.

Make MCM only the height of the screen and let VFM handle the scrolling.
Developer
Posts: 2,268
Registered: ‎07-08-2009
My Device: various
My Carrier: various

Re: Nested Managers - keeping Manager from scrolling

@dnepr: that's pretty much what I told akhan back in the day.

 

However, I suspect some additional problem there: both akhan and david_schwartz_bb seem to have problems specifically with ObjectListField. And there was a report on a totally difference issue, but still to do with ListField and scrolling. Might well be an OS bug - that other issue most definitely was.

----------------------------------------------------------
please click 'Accept Solution' on posts that provide the solution to the question you've posted. Don't say "Thanks", press 'Like' button instead!
New Developer
Posts: 137
Registered: ‎02-04-2010
My Device: Tour 9630
My Carrier: verizon

Re: Nested Managers - keeping Manager from scrolling

I'm setting the height via super.setExtent(300,300); but it seems to be overiden by the ObjectListField.