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

Posts: 128
Registered: ‎05-06-2010
My Device: storm 2

UI with tabs that are scrollable



I have followed the sample at  




and made a tabbed UI.  The problem is where the fields on each tab exceed the height of the screen, they are either cut off or squashed.  How do I make the vertical field manager scrollable?


I've tried passing style parameters to each vertical field manager's constructor without luck.






Posts: 85
Registered: ‎05-03-2010
My Device: Not Specified

Re: UI with tabs that are scrollable

[ Edited ]

Here's something that might help you




And to cut a long story short, If you have focusable fields that go beyond the visible area of the screen or manager, then when you navigate to bottom fields the manager will scroll itself.

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

Re: UI with tabs that are scrollable

The problem of the original poster is that in the tabbed view focus is mostly on the HorizontalFieldManager holding the tabs.  I see two possible solutions:


1) Have some focusable fields in the VerticalFieldManager holding the main view.  Then, when you navigate down, you shift focus there and the system start auto-scrolling the Manager once you try to go beyond the bottom of the screen.  For this, the link provided by TobiasReaper is a great starting point;


2) If you don't have any focusable fields in the main viewing area (maybe some text and pictures like an on-line article, but no real "active" fields), override navigationMovement(int dx, int dy, int status, int time) in your HorizontalFieldManager.  In there, check the dy parameter.  If it is non-zero, change the scroll position of your VerticalFieldManager accordingly using Manager.getVerticalScroll() and Manager.setVerticalScroll() and return true.  Otherwise, return super.navigationMovement(...)



please click 'Accept Solution' on posts that provide the solution to the question you've posted. Don't say "Thanks", press 'Like' button instead!