08-05-2008 07:19 AM - edited 08-05-2008 09:18 AM
Hi,
I am new in Blackberry. I delved into using both of horizontal scroll and vertical scroll, however there is no adequate solution (or really there is no way?). By the way, I am trying to show a datagrid on the screen, but it don't fit into the screen. There are twelve columns and over hundred rows which are neither editable nor selectable.
Thanks for your replies!
Solved! Go to Solution.
08-05-2008 09:35 AM
You can create a HorizontalFieldManager for each row and add them to a VerticalFieldManager. If they are both scrollable and the grids are focusable you should be able to scroll. You can see a full example in the knowledge base article on How to use the UI API to create an editable table.
08-05-2008 09:56 AM
08-05-2008 11:18 AM - edited 08-05-2008 11:25 AM
If you override Manager.moveFocus() you can manually call setVerticalScroll() or setHorizontalScroll(). You can use status from the moveFocus function to tell whether you are moving vertically or horizontally.
04-16-2009 05:14 PM
Hi,
I have the same requirement but I could not get it to work. Can you please post a code snippet explaining how to override moveFocus and set the vertical scroll ?
thanks,
04-20-2009 09:02 PM
04-21-2009 12:32 AM
Take a look at the thread below. This solved my issue.
http://supportforums.blackberry.com/rim/board/mess
04-21-2009 08:27 AM - edited 04-21-2009 08:31 AM
I tried your link and also in debugging I checked and all my fields return true for isFocusable()...
To recap, I have it setup like the table demo, I have 1 main vertical manager, 1 main horizontal manager, and then 6 columns made with 6 more vertical managers. The "cells" are RichTextFields set to USE_TEXT_WIDTH with borders...
I figured I would just have to set Manager.HORIZONTAL_SCROLL in the main vertical manager and then Manager.VERTICAL_SCROLL in the horizontal manager and it would work...but it will only scroll horizontally. I have tried all possible combinations, what is interesting is that if I put the just the vertical scroll in either manager or even nothing, I can scroll vertically no problem, but not horizontally. as soon as I put horizontal scroll in either of the main managers I can then only scroll horizontally...
Also, if I comment out the columns, as long as they do not overlap horizontally the vertical scroll works perfect, then, as soon as add one column that is off the screen, I can only do horizontal scroll...