If by scrollbars you mean the small blue arrows, then you can get these to display using the method Jessica described above (set style bits VERTICAL_SCROLL
and VERTICAL_SCROLLBAR
). However, if by scrollbars you are referring to actual bars that indicate the scrolled position (as seen in the Browser app) then you would need to draw these on the manager yourself, as the BlackBerry API doesn't provide you with any way to display them automatically.
To do something like that you'd need to subclass VerticalFieldManager
and override the paint
method. Use a combination of the screen height (Display.getHeight()
), the manager height (getVirtualHeight()
) and the scroll position (getVerticalScroll()
) to calculate the Y position and height of the bar, and then draw it on the screen using g.drawRect()
or something similar.