Adding vertical scrollbar to screen in blackberry application?

Things that extends net.rim.device.api.ui. Manager (like a VerticalFieldManager) can have style bits set in the constructor that specify which type(s) of scrolling you want and whether or not the scrollbars (arrows) should be displayed. Put your Field into a manager that has scrolling enabled and set the manager for the screen You need to set the manager containing the component/field that is too large for the screen to have scrolling enabled AND scrollbars drawn to see scroll arrows.

The style bits you want to set are: Manager. VERTICAL_SCROLL | Manager. VERTICAL_SCROLLBAR If your UI is built on top of the blackberry classes MainScreen or FullScreen, you can use the constructor taking an argument of type long to set the style bits: MainScreen(long style) could be called as MainScreen(Manager.

VERTICAL_SCROLL | Manager. VERTICAL_SCROLLBAR); to set the style bits for the screen to include scrolling and vertical scroll indicator arrows. There is an occasional issue that FieldManagers that are fixed size will sometimes not show scroll arrows (but they'll still scroll).

See http://stackoverflow.com/questions/1660230/blackberry-verticalfieldmanager-with-fixed-size-scroll-issue if you are concerned about that issue.

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.

If you want a fancier-looking scrollbar, take a look at my article in BlackBerry knowledge base: supportforums.blackberry.com/t5/Java-Dev....

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions