06-07-2010 11:49 AM
I've been searching the forum for a couple of hours now but didn't find a working solution to my problem. My problem is that I've got a VerticalFieldManager that contains other Managers (e.g. HorizontalManagers with some content) and it should be possible to scroll through the VerticalFieldManager's content without having to focus every single field. In other words: I'd like to scroll within a VerticalFieldManager by a certain step width (e.g. 50 pixels) rather than by focus.
Isn't there any way to do that for a BlackBerry with a Trackball or Trackpad?
Solved! Go to Solution.
06-07-2010 12:10 PM
If you don't want to override navigationMovement() and start setting vertical scrolling position manually (i.e. Manager.setVerticalScroll()), you might consider adding focusable NullField's every 50 or so pixels. This way your trackball/trackpad movements are still handled by BB framework according to the focus, but thanks to those NullField's they will never scroll by more than your chosen distance.
If you have some TextFields within and want to scroll through them rather than jumping over, consider making them focusable but not editable (READONLY).
This will not give you the exact behavior you want to achieve, but it will save you a lot of headache.
Still, if you are feeling brave, override navigationMovement() and use setVerticalScroll() and setFocus() as you deem necessary. Prepare for long debugging hours (days? weeks?) trying to achieve an intuitive enough interface. And don't complain when it doesn't work for touchscreen devices.
06-08-2010 05:12 AM
Thank you very much for your answers. @jacobtabak: In this particular case, I don't want any of those fields to gain focus since they just view non-editable information.
I've already worked with NullFields to achieve this kind of behaviour but didn't know how to place them automatically on certain positions within the Manager. I'll have a look for that and try this solution again. Overriding navigationMovement() didn't work exactly the way I wanted but I'll probably give it another try.
Thanks for now, I'll let you know my results
07-05-2010 10:51 AM
I've been very busy the last few weeks so I'm a bit late with posting my results. For me, using NullFields worked best. By using NullFields and adding them to certain positions of the screen, scrolling was possible but not very seamless.
Hopefully there'll be a solution to that problem in later releases of the BlackBerry API but for now this solution works, too.
Thanks again for your help!